HighDots Forums  

Re: need help with menu javascript

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: need help with menu javascript in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin Honnen
 
Posts: n/a

Default Re: need help with menu javascript - 01-02-2005 , 07:54 AM








Jackson Yap wrote:


Quote:
Why is it that the javascript menu could not work at
www.apchosting.net but could work at
http://home.pacific.net.sg/~jacksony ? (the drop down bar could not work
at www.apchosting.net but can drop at home.pacific.net.sg. I suspect it
is a server problem but was told it is not possible, therefore assuming
it is a client script problem?
Mozilla's JavaScript console shows the following error:

Error: missing ; before statement
Source File: http://www.apchosting.net/mm_menu.js
Line: 1, Column: 61
Source Code:
+ itemTop +'px;'+ itemProps +'">'; var dClose = '</div>' if
(menu.bgImageUp) dTag = '<div id="menuItem'+ countItems +'"
style="background:url('+menu.bgImageUp+');position :absolute;left:' +
itemLeft + 'px;top:'+ itemTop +'px;'+ itemProps +'">'; var l

It seems the whole script is on one line, maybe you have run the script
through a script cruncher to compress it. You will need to insert a
semicolon after
var dClose = '</div>'
e.g.
var dClose = '</div>';
to have correct syntax.

On the other server the script file has line breaks and then JavaScript
automatically inserts semicolons.

--

Martin Honnen
http://JavaScript.FAQTs.com/


Reply With Quote
  #2  
Old   
Jackson Yap
 
Posts: n/a

Default Re: need help with menu javascript - 01-07-2005 , 12:01 PM






Thank you very much! Don't know but once i do that my dreamweaver
starts screwing up with javascripts. maybe I would restart my computer.
Thank you alot my saver!

Martin Honnen wrote:
Quote:

Jackson Yap wrote:


Why is it that the javascript menu could not work at
www.apchosting.net but could work at
http://home.pacific.net.sg/~jacksony ? (the drop down bar could not
work at www.apchosting.net but can drop at home.pacific.net.sg. I
suspect it is a server problem but was told it is not possible,
therefore assuming it is a client script problem?


Mozilla's JavaScript console shows the following error:

Error: missing ; before statement
Source File: http://www.apchosting.net/mm_menu.js
Line: 1, Column: 61
Source Code:
+ itemTop +'px;'+ itemProps +'">'; var dClose =
'</div>' if (menu.bgImageUp) dTag = '<div id="menuItem'+
countItems +'"
style="background:url('+menu.bgImageUp+');position :absolute;left:' +
itemLeft + 'px;top:'+ itemTop +'px;'+ itemProps +'">'; var l

It seems the whole script is on one line, maybe you have run the script
through a script cruncher to compress it. You will need to insert a
semicolon after
var dClose = '</div>'
e.g.
var dClose = '</div>';
to have correct syntax.

On the other server the script file has line breaks and then JavaScript
automatically inserts semicolons.



Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.