Uploading

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.



Go Back   Webforumz.com > Main Forums > Hosting Related > Hosting & Domains

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Sep 7th, 2005, 14:31
Junior Member
Join Date: Sep 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote

  #2 (permalink)  
Old Sep 7th, 2005, 14:37
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
why dont you post up the code, so we can have a look?
Reply With Quote
  #3 (permalink)  
Old Sep 7th, 2005, 14:48
Junior Member
Join Date: Sep 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
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]+"'");
}
Reply With Quote
  #4 (permalink)  
Old Sep 7th, 2005, 14:51
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
could you not use a simpler code instead of using the macromedia ones? you can do a simple rollover in two lines of code.
Reply With Quote
  #5 (permalink)  
Old Sep 7th, 2005, 14:59
Junior Member
Join Date: Sep 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
  #6 (permalink)  
Old Sep 7th, 2005, 15:06
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
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
Code: Select all
<SCRIPT LANGUAGE="JavaScript">

image1 = new Image();
image1.src = "images/rollover-on.gif";

</script>
and for your button

Code: Select all
<a href="index.php" onmouseover="image1.src='images/rollover-on.gif';"
			onmouseout="image1.src='images/rollover-off.gif';">
          [img]images/rollover-off.gif[/img]</a>
also, have you considered using css buttons?
Reply With Quote
  #7 (permalink)  
Old Sep 7th, 2005, 15:20
Junior Member
Join Date: Sep 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #8 (permalink)  
Old Sep 7th, 2005, 16:05
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
well do you have a link for the webpage?
Reply With Quote
  #9 (permalink)  
Old Sep 7th, 2005, 16:13
Junior Member
Join Date: Sep 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #10 (permalink)  
Old Sep 7th, 2005, 17:04
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #11 (permalink)  
Old Sep 8th, 2005, 12:06
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
Reply

Tags
uploading

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 03:32.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43