...

View Full Version : help with menu



ilovespock
04-02-2009, 08:15 PM
I have a JavaScript function as follows for a menu with a hidden dropdown:

var timeout = 5;
var closetimer = 0;
var menuitem = 0;
var browser = navigator.appName;


function test(){


}

function mopen(id){







}

function mclose(){

}

function closetime(){

}

function cancelclosetime(){




}

document.onclick = mclose;




I want to "call" into this html a JavaScipt function that will print the menu, so if there are edits to be done to the menu in the future, they can easily be done globally on all pages on the site by editing the single file.
But this doesn't seem to be working -- my knowledge of JavaScript is very limited, not sure if I'm making a small quote error or just entirely off….


document.write('<div id="siteNav">')
document.write("<ul>")
document.write("<li>")
document.write('<a onmouseover="mopen(\'m1\')" onmouseout="closetime()">')
document.write("<b>Some<\/b>")
document.write(<"\/a>")
document.write('<div id="m1" onmouseover="cancelclosetime()" onmouseout="closetime()">')
document.write('<a href="./Some2.html">Topic of Some Page 2<\/a>')
document.write('<a href="./Some3.html">Topic of Some Page 3<\/a>')
document.write('<a href="./Some4.html">Topic of Some Page 4<\/a>')
document.write('<a href="./Some5.html">Topic of Some Page 5<\/a>')
document.write('<a href="./Some6.html">Topic of Some Page 6<\/a>')
document.write('<a href="./Some7.html">Topic of Some Page 7<\/a>')
document.write('<a href="./Some8.html">Topic of Some Page 8<\/a>')
document.write("<\/li>")
document.write("<\/ul>")
document.write("<\/div>")

oracleguy
04-02-2009, 10:39 PM
Please do not cross post.

Original thread: http://www.codingforums.com/showthread.php?t=162918



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum