Uploading a Website with Javascript

They have: 5 posts

Joined: Jan 2004

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's picture

She has: 5,507 posts

Joined: Feb 2000

Please provide an url so we can see what the error is. Smiling

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.

They have: 5 posts

Joined: Jan 2004

Hi,

Sorry, I forgot to include the url.

Here it is: wizwerks.com/test

Thanks!

mjs416's picture

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's picture

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.

They have: 5 posts

Joined: Jan 2004

Hi,

Yes I did upload the .js file but it still does not work.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

hi, you probably just missed my message, but no, there is a file missing.

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's picture

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's picture

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.

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's picture

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.

They have: 461 posts

Joined: Jul 2003

druagord wrote: 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.

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!!!!

volka wrote: volka
Extreme Guru

Joined: 07 May 2002
Posts: 4197
Location: Berlin, ger

Posted: Mon Oct 27, 2003 9:39 am Post subject:
what's document.entry?

I strongly suggest using a javascript debugger. The mozilla suite has one on-board. If you're using IE you can download a script debugger at http://msdn.microsoft.com/library/default.asp?url=/downloads/list/webdev.asp?frame=true
_________________
http://www.catb.org/~esr/faqs/smart-questions.html

POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.

Suzanne's picture

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's picture

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). Smiling

druagord's picture

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's picture

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's picture

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. Smiling

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.