Drop down menu help in html

Started by Thomas July 3rd, 2004 8:01 PM
  • 748 views
  • 16 replies

Thomas

HAIL HYDRA!

Age 34
Male
Lafayette, LA
Seen February 11th, 2022
Posted November 22nd, 2018
5,984 posts
19.2 Years
I am making a pokedex and need help with the drop down menu. I want the page to come up with the user pics a pokemon. How do you do this, or is it even possible? Any help would be appriciative!
Age 62
Male
Melbourne, Australia
Seen April 26th, 2018
Posted June 9th, 2014
11,439 posts
19.7 Years
I assume you mean a drop-down menu that navigates to a given page when you select an item, like the quick-jump menu at the bottom of the page on PC? It's easy, it just needs a line of Javascript. I can give you the code, but do you have Dreamweaver? It's a lot easier to do it automatically in Dreamweaver.


"One reason why mathematics enjoys special esteem, above all other sciences, is that its laws are absolutely certain and indisputable, while those of other sciences are to some extent debatable and in constant danger of being overthrown by newly discovered facts."
Albert Einstein

"What science can there be more noble, more excellent, more useful for men, more admirably high and demonstrative than mathematics."
Benjamin Franklin

"Mathematics, rightly viewed, possesses not only truth, but supreme beauty – a beauty cold and austere, like that of sculpture, without appeal to any part of our weaker nature, without the gorgeous trappings of paintings or music, yet sublimely pure and capable of a stern perfection such as only the greatest art can show."
Bertrand Russell

avatar and signature by FoxHound

ANNOY ME AT YOUR PERIL. I am becoming increasingly tired of the unmanly elitism and closed-mindedness of certain members who shall remain unnamed.

Thomas

HAIL HYDRA!

Age 34
Male
Lafayette, LA
Seen February 11th, 2022
Posted November 22nd, 2018
5,984 posts
19.2 Years
I have the same problem..I have Html for the world wide web (with xhtml and css) by visual quickstart guide...

Here i really want it to go to the page when you pick the certian item and then press a submit button....does anyone know what i am saying???

Thomas

HAIL HYDRA!

Age 34
Male
Lafayette, LA
Seen February 11th, 2022
Posted November 22nd, 2018
5,984 posts
19.2 Years
It had the same stuff that you told me. Can anyone else help me on my problem?

Here is what i want agian:
Here i really want it to go to the page when you pick the certian item and then press a submit button.
Age 29
asia you moron
Seen November 28th, 2010
Posted October 19th, 2006
681 posts
19.1 Years
I hope this help. If you're talking about this:
<form name="form1">
<select name="form" onChange="MM_jumpMenu('parent',this,0)">
    <option>Choose thing</option>
    <option>----</option>
    <option value="http://pokecommunity.com">item one</option>
    <option value="http://pokecommunity.com">item two</option>
    <option value="http://pokecommunity.com">item three</option>
</select>
</form>
There that should help :)
Netbattle Names: Golden Groudon, Hyper Beam Tyranitar, Double-Edge Shedinja

Attn: I am brazilian and nubish and so so and I clause Skarmbliss, DDtar, Boah, CM legends, Metagross, Blissey, Taunt, Ubers, Skarmory, Focus Punch, Subsitute, life, and sunflora (because it is too powerful with it's CB absorb). Don't argue. I'm am only learning. Be nice to South American people, yo.


Age 29
asia you moron
Seen November 28th, 2010
Posted October 19th, 2006
681 posts
19.1 Years
nope i tried it..it didnt work

anyone else got any idea?
Worked for me.
:surprised
Netbattle Names: Golden Groudon, Hyper Beam Tyranitar, Double-Edge Shedinja

Attn: I am brazilian and nubish and so so and I clause Skarmbliss, DDtar, Boah, CM legends, Metagross, Blissey, Taunt, Ubers, Skarmory, Focus Punch, Subsitute, life, and sunflora (because it is too powerful with it's CB absorb). Don't argue. I'm am only learning. Be nice to South American people, yo.


Age 62
Male
Melbourne, Australia
Seen April 26th, 2018
Posted June 9th, 2014
11,439 posts
19.7 Years
The reason it didn't work is that you just copied the body code from Dreamweaver and didn't include the code that defines the function.

OK, this is the Dreamweaver code for the jump menu.

First, paste this code between your <head> tags.

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}
//-->
</script>
That's the Javascript that defines the function.

Now, where you want to put the menu, paste this code:

<form name="form1">
  <select name="pokedexjumpmenu" onChange="MM_jumpMenu('parent',this,0)">
  <option value="pokedex.php?pokemon=001" selected>001 Bulbasaur</option>
  <option value="pokedex.php?pokemon=002">002 Ivysaur</option>
  <option value="pokedex.php?pokemon=003">003 Venusaur</option>
  </select>
  <input type="button" name="Button1" value="Go" onClick="MM_jumpMenuGo('pokedexjumpmenu','parent',0)">
</form>
You'd need to change the links etc though, and add more Pokmon.


"One reason why mathematics enjoys special esteem, above all other sciences, is that its laws are absolutely certain and indisputable, while those of other sciences are to some extent debatable and in constant danger of being overthrown by newly discovered facts."
Albert Einstein

"What science can there be more noble, more excellent, more useful for men, more admirably high and demonstrative than mathematics."
Benjamin Franklin

"Mathematics, rightly viewed, possesses not only truth, but supreme beauty – a beauty cold and austere, like that of sculpture, without appeal to any part of our weaker nature, without the gorgeous trappings of paintings or music, yet sublimely pure and capable of a stern perfection such as only the greatest art can show."
Bertrand Russell

avatar and signature by FoxHound

ANNOY ME AT YOUR PERIL. I am becoming increasingly tired of the unmanly elitism and closed-mindedness of certain members who shall remain unnamed.