WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Have a Pulldown as menu
  • Print
Pages: [1]   Go Down

Author Topic: Have a Pulldown as menu  (Read 6748 times)

Offline Cazz

  • Posts: 93
Have a Pulldown as menu
« on: March 06, 2008, 10:33:15 PM »
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: [Select]
   <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>

Then I have install the model show_menu2 and add it to my index.php

there I want to have my menu

Code: [Select]
<form name="form1" id="form1">
  <select name="menu1" onchange="MM_jumpMenu('parent',this,0)">
<?php         
show_menu2
(0, SM2_ROOT, SM2_START, SM2_ALL, &#39;<option>[menu_title]&#39;, &#39;</option>&#39;, &#39;&#39;, &#39;&#39;);
?>

  </select>
</form>

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: [Select]
<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>

My question is where do write so when I choose in the menu it go to the right page.
Logged

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: Have a Pulldown as menu
« Reply #1 on: March 07, 2008, 12:23:58 AM »
Hi,

just an first idea, give this a try:

Code: [Select]
<?php         
show_menu2
(0, SM2_ROOT, SM2_START, SM2_ALL, &#39;<option value="[url]">[menu_title]&#39;, &#39;</option>&#39;, &#39;&#39;, &#39;&#39;);
?>

Regards Bernd
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

Offline Cazz

  • Posts: 93
Re: Have a Pulldown as menu
« Reply #2 on: March 07, 2008, 04:31:16 PM »
ahhh thanks alot, that work great  :lol: :lol: :lol: :lol: :lol:
Logged

Offline Cazz

  • Posts: 93
Re: Have a Pulldown as menu
« Reply #3 on: March 07, 2008, 10:31:44 PM »
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
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Have a Pulldown as menu
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2