PDA

View Full Version : Help! Externally linked drop down menu won't work



WebCom
12-21-2005, 08:43 PM
We are re-doing our site to be more fluid and less cluttered in the code. Currently our dynamic drive drop down menu is working when inside the page code, but when I link it externally I can't get it to work. I have read many instructions and forum posts on linking externally and have followed them , but there is something I am doing wrong. I can't figure it out!

Here is the current, working menu www.hostingwithus.com

Here is the page with the non working menu

www.hostingwithus.com/templates/newlayout.htm

Ths css is also external, and includes the style for the drop down menu.

www.hostingwithus.com/templates/hwu.css

jscheuer1
12-22-2005, 03:38 AM
For one thing, in navbar.js, this line:


var hidemenu_onclick="yes"

should be:


var hidemenu_onclick="yes"

There are 48 instances of '"' in navbar.js, probably meaning 24 situations similar to the above. Most likely all '"'s need to be replaced with the double quote (").

There could be other problems. For example in '/livehelp/include/javascript.php' on line 142, there is:


this.currentY = parseInt(document.getElementById('floatLayer').style.top);

But no element with the id 'floatLayer' exists on the page.

To easily see if there are any other errors, these need to be corrected first.

WebCom
12-22-2005, 05:06 AM
Thanks...I fixed those errors as well as a few othere similar copying/pasting errors.

As far as the javascript for the live help, obviously, I don't know a lick about javascript, this was coded by another programmer. That is included there but is not called until a different page. I guess certain code has to be in the header to track where the visitor is. Will the scripting of the live help affect the drop down menu?

Our site is a huge maze of php includes and such, I might need to go back to the programmer to help, unless one of you brilliant people can make sense of it. :)

jscheuer1
12-22-2005, 06:45 AM
Without a detailed analysis of how the two scripts interact, if at all, it would be hard to say. Just fix up the menu and see. If it appears that there are no other errors with the menu and it is still not working, you could just put an element on the page with the missing id and give it a style for top, that may make yet other errors from that script apparent though.

The 'programmer' really should not be 'let off' having a script attached to a page that doesn't have the objects on it that the script is looking for.