Uploading a Website with Javascript
Hi,
I am a newbie here and to web designing.
I recently did you a webpage with Dreamweaver.
I used the drop-down menu for my navigation bar. It works fine when I preview it in IE browser. I decided to put it up on the server as a test site.
When I checked the test site, it seems that the drop-down menu does not work. The website loads fine but on the status bar shows "Error on Page". When I put my cursor on the navigational buttons with the drop-down menu, the status bar shows "Shortcut to Javascript:;".
I would appreciate any help to fix this.
Thanks in advance!
Suzanne posted this at 19:41 — 20th January 2004.
She has: 5,507 posts
Joined: Feb 2000
Please provide an url so we can see what the error is.
Also, you can check out what the error is, it may help you find the problem yourself. Do you know how to access the Javascript Console in IE? I forget what it's called, but you can turn it on and view the error messages, I think.
neogeek posted this at 20:16 — 20th January 2004.
They have: 5 posts
Joined: Jan 2004
Hi,
Sorry, I forgot to include the url.
Here it is: wizwerks.com/test
Thanks!
mjs416 posted this at 20:44 — 20th January 2004.
They have: 127 posts
Joined: Dec 2003
Did you upload the javascript file to the server with the page? It should be some small file with the .js extension.
Suzanne posted this at 20:54 — 20th January 2004.
She has: 5,507 posts
Joined: Feb 2000
most of your scripts are inline, but you have one that needs to be uploaded.
http://www.wizwerks.com/test/alternate/mm_menu.js says it's missing, as suggested by mjs416.
You also have some code in the body that's invalid. All style elements should be within the head tags, and most of the script elements as well (except where they are invoking a function).
You should validate the code to get rid of the problem areas, and encode your email address to protect it from spambots -- hiveware.com has a nice Enkoder (webform) that you can use online or download and run from your computer.
neogeek posted this at 20:54 — 20th January 2004.
They have: 5 posts
Joined: Jan 2004
Hi,
Yes I did upload the .js file but it still does not work.
Suzanne posted this at 21:01 — 20th January 2004.
She has: 5,507 posts
Joined: Feb 2000
hi, you probably just missed my message, but no, there is a file missing.
neogeek posted this at 21:04 — 20th January 2004.
They have: 5 posts
Joined: Jan 2004
Hi,
Thank you for your fast reply. I did upload the file onto the server. Do I have to link it to the file?
Suzanne posted this at 21:07 — 20th January 2004.
She has: 5,507 posts
Joined: Feb 2000
The file linked in your code -- http://www.wizwerks.com/test/alternate/mm_menu.js is not on your server. Click the link to see for yourself?
Suzanne posted this at 21:09 — 20th January 2004.
She has: 5,507 posts
Joined: Feb 2000
Well there's why -- you have it here: http://www.wizwerks.com/test/mm_menu.js
And in the code, you have it in a subfolder called /alternate/.
Change your code to reflect the actual location of the file.
neogeek posted this at 21:12 — 20th January 2004.
They have: 5 posts
Joined: Jan 2004
Hi Suzanne,
Thanks so much for your help.
I moved the file from another folder and I guess I did not changed it in the code.
Fixed it already. Thanks again and have a great day!
druagord posted this at 21:31 — 20th January 2004.
He has: 335 posts
Joined: May 2003
by the way Suzanne there is no javascript console in IE mac or windows so debugging javascript in IE is a question of guess and trial.
m3rajk posted this at 18:57 — 22nd January 2004.
They have: 461 posts
Joined: Jul 2003
not true not true not true.
found it. this was posted to me at a diff board. ie may not have it per se, but ther is one!!!!
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
Suzanne posted this at 06:28 — 21st January 2004.
She has: 5,507 posts
Joined: Feb 2000
No! I was sure there was a way to view errors in IE -- oh, yes, only through that error screen that pops up when you click on the errors, right? PC only? I think you have to enable it though.
Abhishek Reddy posted this at 06:38 — 21st January 2004.
He has: 3,348 posts
Joined: Jul 2001
That's right, Suzanne. It's just an error report dialog, not a console. Not sure if it's PC-only. It's toggled somewhere in the Advanced options, iirc ("display scripting errors" or something).
druagord posted this at 14:22 — 21st January 2004.
He has: 335 posts
Joined: May 2003
It is the same thing on ie mac just a popup that tell you there is a error on line XX. Where XX is most of the time a line number that doesn't mean anything.
IF , ELSE , WHILE isn't that what life is all about
Suzanne posted this at 14:37 — 21st January 2004.
She has: 5,507 posts
Joined: Feb 2000
Darn, I was hoping there was a more helpful system. I suppose the line number at least tells you where things are breaking down, though the error could be many lines above it. *sigh*
It's been so long since I used IE for anything but quick testing!
Abhishek Reddy posted this at 14:48 — 21st January 2004.
He has: 3,348 posts
Joined: Jul 2001
The line number isn't very helpful. This handy equation should help you to track down the real error, though:
| (IE_line_number) - (real_line_number) | = (how_desperately_you_want_it_fixed) * (how_many_seconds_past_deadline_you_are)^2 / (entropy_of_whole_script)
'Easy.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.