Forum Moderators: open

Message Too Old, No Replies

Javascript breaks if I upload file! Argh!

javascript, mm_menu, breaks, re-upload

         

tnrstudios

2:48 pm on Jun 27, 2006 (gmt 0)

10+ Year Member



Ok I have spent the last day and a half trying to fix this problem! Any help would be so appreciated :)

I am running [url]www.wpirg.org[/url] I inherited the code from this website from another person who developed the site in Dreamweaver. That person has since disapeared and is of no help to me.

I recently tried to update the site by changing some basic content on it (board members etc.) But it did not work.

The Problem - If I download one of the files and then re-upload it and my drop-down menu and rollovers are all disabled! For an example of this see: [url]www.wpirg.org/wpirg/staff.html[/url] and compare it to [url]www.wpirg.org/wpirg-devsite/test/staff.html[/url]

The only thing I did was download staff.html and re-upload it to /test/ and then this happens! I have since tested this on many files and it happens the same way everytime!

The Code

mm_menu.js - Can be viewed at [url]www.wpirg.org/wpirg-devsite/test/mm_menu.js[/url]

Staff.html (which connects to mm_menu.js) can view the source of it @ www.wpirg.org/wpirg-devsite/test/staff.html:


Code taking off..post was to big

Thanks to anyone who can help! I would appreciate it so much :)

[edited by: tnrstudios at 3:14 pm (utc) on June 27, 2006]

Dennis Reinhardt

3:04 pm on Jun 27, 2006 (gmt 0)

10+ Year Member



> everything goes screwy!

I don't see a problem. Contract staff has the note "thanks Jess..." and Grant staff is now "none". Other than that, I see no difference between the pages.

Try clearing the cache on your browser and try it again yourself.

tnrstudios

3:14 pm on Jun 27, 2006 (gmt 0)

10+ Year Member



Sorry...I should have been more specific, the drop-down menu and the button rollovers do not work: in other words my javascript is not working.

Bernard Marx

3:32 pm on Jun 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The code appears to be slightly corrupted on the test page:

Line 257

[blue]var now = new Date();[/blue]

..becomes, on the test page, lines 258,259

[red]va
r now = new Date();[/red]

..which is a JS error.

Bernard Marx

3:33 pm on Jun 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also check what happens to line 245.

tnrstudios

4:06 pm on Jun 27, 2006 (gmt 0)

10+ Year Member



Thanks for the help thus far :)

I editted the problem on 257, unfotunately the problem still remains (drop down and rollovers still not working)

Bernard - I dont notice anything wrong with 245...am I missing something?

Bernard Marx

4:27 pm on Jun 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This line (245) is broken

xoxo[9] = "http://www.opirg.org/WPIRG/testquotes/test-suzuk
i.gif";

Bernard Marx

4:53 pm on Jun 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In fact, lines are broken all over the place in both the HTML and JS (maybe CSS too).
Check the error message in your browser, and use Firefox's Javascript console.

Perhaps whatever prog you are using to do the uploading is corrupting your files.

tnrstudios

6:13 pm on Jun 27, 2006 (gmt 0)

10+ Year Member



Thanks Bernard its all fixed, CuteFTP for Mac was messing up my uploads!