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 Link to comment https://forums.phpfreaks.com/topic/74561-menus-submenus-and-subsubmenus/ Share on other sites More sharing options...
fenway Posted October 24, 2007 Share Posted October 24, 2007 What's wrong? Link to comment https://forums.phpfreaks.com/topic/74561-menus-submenus-and-subsubmenus/#findComment-377033 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 Link to comment https://forums.phpfreaks.com/topic/74561-menus-submenus-and-subsubmenus/#findComment-377077 Share on other sites More sharing options...
fenway Posted October 24, 2007 Share Posted October 24, 2007 Post this live somewhere Link to comment https://forums.phpfreaks.com/topic/74561-menus-submenus-and-subsubmenus/#findComment-377101 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.