Pulldown menu question
How do I get links into a pulldown menu? I used this format (shown without the greater-than/less than signs), but it just gave a normal pulldown menu and would not visit the links when clicked on:
form
select
option a href="...."/a
option a href="...."/a
option a href="...."/a
/select
/form
I appreciate any help regarding this.
The Webmistress posted this at 08:52 — 8th November 2002.
She has: 5,586 posts
Joined: Feb 2001
Welcome to TWF fiesty,
This is how I do mine:
<form name="links">
<select name="select" onChange="MM_jumpMenu('parent',this,0)">
<option value="page-name1.html">Page 1</option>
<option value="page-name2.html">Page 2</option>
</select>
</form>
Julia - if life was meant to be easy Michael Angelo would have painted the floor....
fiesty_01 posted this at 09:24 — 8th November 2002.
He has: 173 posts
Joined: Nov 2002
Thanks alot! I don't know if I've ever seen the onChange="MM_jumpMenu('Parent',this,0)" command before now. Must be a little more advanced than where I'm currently at.
The Webmistress posted this at 09:37 — 8th November 2002.
She has: 5,586 posts
Joined: Feb 2001
Glad I could help. That basically tells it to change the page to the one selected from the menu.
Why not stop by the Introductions Forum and tells us a bit about yourself
Julia - if life was meant to be easy Michael Angelo would have painted the floor....
Megan posted this at 14:19 — 8th November 2002.
She has: 11,421 posts
Joined: Jun 1999
That's a macromedia script - they're notorious for being more complicated than they need to be. That can't be the only part of the script - there must be a second part defining the MM_jumpMenu('Parent',this,0) is. I'll see if I can a complete script... it's really just a matter of changing the window.location to the value of the form option.
Megan
Connect with us on Facebook!
The Webmistress posted this at 14:23 — 8th November 2002.
She has: 5,586 posts
Joined: Feb 2001
Oh yeah, fogot the head bit!!
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
Yes it Macromedia Dreamweaver code, but it works!
Julia - if life was meant to be easy Michael Angelo would have painted the floor....
Megan posted this at 14:24 — 8th November 2002.
She has: 11,421 posts
Joined: Jun 1999
Here, try this (sorry, I don't have my own code for this, I don't use them very often...):
onChange="window.location = this.options[this.selectedIndex].value"
Where the value is set to an html page reference. Much simpler
Megan
Connect with us on Facebook!
fiesty_01 posted this at 17:29 — 8th November 2002.
He has: 173 posts
Joined: Nov 2002
Thanks to both of you (webmistress and Megan). This code has given me problems, so I hope I don't get an ulcer trying to figure it out.
Anyway, I will probably fill out more on my personal information page soon. But, for now, my name is Steve, I'm 32, and I live in TN.
I have just recently started all of this webmastering stuff. I love html, but I hate all these other wierd programs (Java, JavaScript, etc., etc.). It certainly would be nice if all programs were as easy (and made as much sense) as html.
Also, I do not have an actual computer, but instead have WebTV (basically the same thing, but you can't download anything to a disc and it's speed is sort of slow). Oh well, It was worth the price difference for what I'm using it for (mostly internet stuff).
Oh yeah, here's my site:
CLICK HERE
Hope you all have a nice day!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.