![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
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? |
#2
| |||
| |||
|
| 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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |