Pulldown menu linked to a frame

liunx

Guest
Does anyone know what I need to put in the <select> or <option> tags so that when clicked, it opens in a different frame named "main" ? <br />
<br />
Thanks, W.C.<!--content--><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"<br />
"http://www.w3.org/TR/html4/loose.dtd"><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
<title>Link Example</title><br />
<form action="link.pl" target="otherFrameName"><br />
<div><br />
<select name="url"><br />
<option value="http://www.w3.org/TR/REC-html32">HTML 3.2</option><br />
<option value="http://www.w3.org/TR/html4/">HTML 4.01</option><br />
<option value="http://www.w3.org/TR/xhtml1/">XHTML 1.0</option><br />
</select><br />
<input type="submit" value="Send Me"><br />
</div><br />
</form><!--content-->Not exactly what I am looking for. I don't want the input... I want the link to be activated as soon as clicked on; and still open in the "main" frame. I know it's been done to open a _blank , but can't remember what site it was. So targeting the link into a frame should be possible.<br />
<br />
Thanks for all the help, <br />
W.C.<!--content-->That would require javascript. Something Charles (and 10-15% of the people using the web :D) seems to be allergic to.<br />
<br />
Try one of these:<br />
<!-- m --><a class="postlink" href="http://javascript.internet.com/navigation/mixed-menu-frames.html">http://javascript.internet.com/navigati ... rames.html</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://javascript.internet.com/navigation/menu-frames.html">http://javascript.internet.com/navigati ... rames.html</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://javascript.internet.com/navigation/menu-auto-frames.html">http://javascript.internet.com/navigati ... rames.html</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://javascript.internet.com/navigation/menu-frames.html">http://javascript.internet.com/navigati ... rames.html</a><!-- m --><!--content-->Without a submit button the page is worthless to people who do not use JavaScript and to people who do not use a mouse. That's somewhere between one and two out of ten users and that's a lot of people. You can, however, make it so that the submit button only appears when necessary:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"<br />
"http://www.w3.org/TR/html4/loose.dtd"><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
<title>Link Example</title><br />
<form action="link.pl" name="navigation" target="main"><br />
<div><br />
<select name="url"><br />
<option value="">Choose a Specification</option><br />
<option value="http://www.w3.org/TR/REC-html32">HTML 3.2</option><br />
<option value="http://www.w3.org/TR/html4/">HTML 4.01</option><br />
<option value="http://www.w3.org/TR/xhtml1/">XHTML 1.0</option><br />
</select><br />
<script type="text/javascript"><br />
<!--<br />
document.forms.navigation.url.onchange = function () {document.forms.navigation.submit()}<br />
// --><br />
</script><br />
<noscript><input type="submit" value="Send Me"></noscript><br />
</div><br />
</form><!--content-->Gil,<br />
<br />
I eschew JavaScript because I cannot stand forms submitting 'onchange' and my windows being resized and such. And don't get me started on mouse trails. But a whole lot of people cannot use JavaScript because of their disabilities.<!--content-->Understandable. I got tired of the old forum doing stuff and blinking images and such, so I always have JS and images disabled when visiting (BTW, I still use NS 4.8 mostly). This new format won't let me do that, and I am very irritated by the fact that (at 800x600) you always have to page down to see anythig forum related. Also, the new format doesn't work right without javascript. In fact, NS 4.8 won't do a lot of CSS without javascript enabled. Grrr!<br />
<br />
I like your alternate HTML-only suggestions; they make me think. Accessibility seems to be the most disregarded aspect of the web. People are all the time asking how to control the mouse or get rid of the dotted lines around links. Maybe it's just kids, but I can't tell (I'm not).<!--content-->Doesn't anyone know how to write it, not steal it off of other websites? Here's my old pull down menu..<br />
<br />
<select onchange="if ((w=this.options[this.selectedIndex].value)!='') window.location=w" name="Extreme"><br />
<option selected>Extreme</option><br />
<option value="http://www.">Link1</option><br />
<option value="http://www.">Link2</option><br />
<option value="http://www.">Link3</option><br />
<option value="http://www.">Link4</option><br />
<option value="http://www.">Link5</option><br />
</select><br />
<br />
And I am hoping someone will know how to change it so the option open in the frame "main"<br />
<br />
Thanks.<!--content-->Those scripts are there for you to use free of charge. It's not stealing.<br />
<br />
All you have to do is change this bit:<br />
<select onchange="if ((w=this.options[this.selectedIndex].value)!='') window.location=w" name="Extreme"><br />
to:<br />
<br />
<select onchange="if ((w=this.options[this.selectedIndex].value)!='') window.top.main.location=w" name="Extreme"><br />
<br />
Sheesh!<!--content-->Originally posted by WynnXPW <br />
Doesn't anyone know how to write it, not steal it off of other websites? <br />
<br />
Not reinventing the wheel is smart, not stealing.<br />
<br />
HTML, CSS, JavaScript etc is free software _techniques_ and compleatly leagal to reuse and modify if you find something on the net you like (whatever some sites try to tell you).<br />
<br />
However the actuall _content_ (images text etc) on a webpage is not allowed to just rip off.<!--content-->
 
Back
Top