haku87 Posted March 14, 2007 Share Posted March 14, 2007 Hi, my menu is using javascript to create. There has been an error. However, I cannot manage to find the bug.. Could anyone help? It displays Object Required Line 137. The website is http://www.bit-by-bit.edu.sg. What is causing the problem. It was taken from dynamic drive. I did not change anything. Quote Link to comment Share on other sites More sharing options...
Vikas Jayna Posted March 14, 2007 Share Posted March 14, 2007 Well! the problem is with the line:- document.getElementById(cid).style.display="block" The issue is that the variable cid is having some value(say the value is xyz), then the html should contain an id corresponding to xyz like this:- <span id="xyz"></span> or <div id="xyz"></div> Try putting an alert before the line No. 136 and see what value the cid variable contains and whether that id is defined in the html Quote Link to comment Share on other sites More sharing options...
haku87 Posted March 14, 2007 Author Share Posted March 14, 2007 You mean this? Yes, it has. <li> <a href="index.php" onMouseover="expandcontent('menu0', this)"> About Us </a></li> <div id="menu0" class="tabcontent style13"> <span class="style14">|</span> <a href="index.php?content=aim ">Aim</a> <span class="style14">|</span> <a href="index.php?content=mission ">Mission</a> <span class="style14">|</span> <a href="index.php?content=philosophy ">Philosophy</a> <span class="style14">|</span> <a href="index.php?content=testimonials ">Testimonials</a> <span class="style14">|</span> </div> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.