Click to See Complete Forum and Search --> : moving javascript on page


LShi82
03-13-2003, 04:04 PM
I downloaded a javascript from
http://javascript.internet.com/navigation/cascading-menu.html

but once I placed it in Dreamweaver, I can't get it to move to any other part of the page except the very top. How do you manipulate this?

Any advice would be fantastic!

CrazyGaz
03-13-2003, 04:13 PM
try using a DIV before you write the menu

<div id="ID HERE" style="position:absolute; left:0 ; top:how many pixels down you want it">


hope you can work it out from this :)

AdamBrill
03-13-2003, 09:58 PM
Ok, actually it is a bit more complex than that. ;) You can see by the attached code that I have added a function at the bottom of the script(among other things). But, the only thing you have to modify is in the function. This is what it looks like:

menu[0][0].y=100;
menu[0][0].x=100;
document.getElementById('MenuTable').style.left="100px";
document.getElementById('MenuTable').style.top="100px";
document.getElementById('MenuTable').style.width="190px";
You can change everything there... The menu[0][0] is the actual menu and the document.getElementById('MenuTable') is the table used for the background color. The width of the table was set to 100%, but I changed it to be only the size of the menu. If you still want it to be 100% just type that instead of the 190px... Let me know if you have any questions. :D