This is a discussion on "Uploading" within the Hosting & Domains section. This forum, and the thread "Uploading are both part of the Hosting Related category.
|
|
|
|
|
![]() |
||
Uploading
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Uploading
I've just uploaded a site to a host server and the code no longer works the way it did on my local server. Why is this?
It causes the yellow error flag to be displayed in the bottom left corner, when I mouse my mouse over a javascript mouse over image event. |
|
|
|
|||
|
why dont you post up the code, so we can have a look?
|
|
|||
|
It's just standard mouse over image replacement javascript that is causing the error when uploaded. Sorry it's a lot. I inherited this code.
function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } function MM_goToURL() { //v3.0 var i, args=MM_goToURL.arguments; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'"); } |
|
|||
|
could you not use a simpler code instead of using the macromedia ones? you can do a simple rollover in two lines of code.
|
|
|||
|
As I said I inherited it, and it worked great until it was uploaded. Why does the code "corrupt" when it's uploaded to the hosting server?
|
|
|||
|
im not sure what you mean by that...
why dont you try this. i gather your wanting to use this as an image preloader/rollover script
|
|
|||
|
Thanks, I'll try that code.
When I say "corrupt" I'm using my boss's word. I don't know what's happened, all I do know is that it works with no errors on my IIS but upload it to where it's going to be accessed from for the internet users and it produces errors. I'm really confused as to why the same piece of code doesn't act the same. I'm new to this only been in the job a month, and all the help in much appreciated. Thanks |
|
|||
|
well do you have a link for the webpage?
|
|
|||
|
The site is uploaded and we can test it, but it can't go live to the internet public until it works, otherwise it looks bad for the company. Sorry.
|
|
|||
|
What method did you use to upload the files?
Also, it sounds like a javascript error, if you could post what that error is it would help. |
|
|||
|
try uploading just using internet explorer, maybe your FTP program is not fully transferring the page. Also empty your browser cache, you maybe be seeing some old and some new bits of the same page.
|
![]() |
| Tags |
| uploading |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Video Uploading Help | dannyg | Graphics and 3D | 1 | Sep 26th, 2007 06:39 |
| uploading help - please | dhall | Starting Out | 9 | Aug 23rd, 2007 19:35 |
| uploading a .mov | ppgpilot | PHP Forum | 2 | Jul 26th, 2006 07:01 |
| Image not uploading | djme | PHP Forum | 2 | Mar 21st, 2006 10:45 |
| uploading | benbacardi | Classic ASP | 4 | Nov 4th, 2004 17:11 |