countdrac Posted October 24, 2007 Share Posted October 24, 2007 i am having problems and if anyone can point out what im doing wrong would be greatly appreciated. this is from my php file... echo "<dl>"; echo "<dt onmouseover=javascript:showSMenu(); onmouseout=javascript:hideSMenu();>Archives</dt>"; $menuNum=1; for ($count=10;$count<20;$count++) { echo "<dl><dt id='smenu".$menuNum."' onmouseover=javascript:showSSMenu('ssmenu".$menuNum."'); onmouseout=javascript:hideSMenu();>".$count."</dt>"; echo "<dd id='ssmenu".$menuNum."' onmouseout=javascript:showSSMenu('');>"; echo "<ul>"; loadList($count,$mainArray,$i); echo "</ul></dd></dl>"; $menuNum++; } echo "</dl>"; and this is the javascript: window.onload=hideSMenu; window.onload=showSSMenu; function showSMenu() { for (var i = 0; i <= 10; i++) { document.getElementById('smenu'+i).style.display='block'; } } function showSSMenu(id) { var d = document.getElementById(id); for (var i = 0; i <= 10; i++) { document.getElementById('ssmenu'+i).style.display='none'; } if(d) { d.style.display='block'; } } function hideSMenu() { for (var i = 0; i <= 50; i++) { if (document.getElementById('smenu'+i)) { document.getElementById('smenu'+i).style.display='none'; } } } thanks dave Quote Link to comment Share on other sites More sharing options...
fenway Posted October 24, 2007 Share Posted October 24, 2007 What's wrong? Quote Link to comment Share on other sites More sharing options...
countdrac Posted October 24, 2007 Author Share Posted October 24, 2007 sorry nothing ever pops up as it is now just the 'archives' heading apears and when you scroll over it the next menu doesnt appear... thanks Quote Link to comment Share on other sites More sharing options...
fenway Posted October 24, 2007 Share Posted October 24, 2007 Post this live somewhere 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.