WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Have a Pulldown as menu
(1/1)
Cazz:
Hi
I have search here but I have not found that I was looking for so now I write my problem instead :)
I like to have a basic pulldown menu form my WB site.
I have add this before the </head>
--- Code: --- <script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
--- End code ---
Then I have install the model show_menu2 and add it to my index.php
there I want to have my menu
--- Code: ---<form name="form1" id="form1">
<select name="menu1" onchange="MM_jumpMenu('parent',this,0)">
<?php
show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<option>[menu_title]', '</option>', '', '');
?>
</select>
</form>
--- End code ---
It show nice but when I dont have any value that tell me where to go nothing happend :wink:
the basic html look like this
--- Code: ---<form name="form1" id="form1">
<select name="menu1" onchange="MM_jumpMenu('parent',this,0)">
<option value="test.htm">Test</option>
<option value="test2.htm">test2</option>
</select>
</form>
--- End code ---
My question is where do write so when I choose in the menu it go to the right page.
BerndJM:
Hi,
just an first idea, give this a try:
--- Code: ---<?php
show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<option value="[url]">[menu_title]', '</option>', '', '');
?>
--- End code ---
Regards Bernd
Cazz:
ahhh thanks alot, that work great :lol: :lol: :lol: :lol: :lol:
Cazz:
almost perfect but one problem
I have to somehow make so menu select that page that I'm looking at.
Now it show page one all the time in the menu
Navigation
[0] Message Index
Go to full version