View Full Version : Iframes and drop downs?


grkgrlie
07-03-2003, 07:42 PM
Um...Is it possible to use a drop down menu with IFrames? If so, how would the code go? My code is as follows, I got it from Lisa Explains It All. hehe, as you can see, I've only partly changed to my things, I'm more concerned with getting it to appear in the right spot....

<script language="javascript">
function jump(form) {
var
myindex=form.menu.selectedIndex
if (form.menu.options[myindex].value != "0")
{
window.open(form.menu.options[myindex].value,
target="foreal");
}
}
//-->
</script><BR><BR><form
name="lissamenu2"><BR><select name="menu" style="background-color:
#<B>CC99FF</B> ; <BR>font size=<B>10</B> ; font-family: <B>comic sans ms</B>;
color:<B>#ffff00</B>" <BR>size="1"
onchange="jump(this.form)"><BR><BR><option value="0"><B>Where to?</B></option>
___<BR><option value="0"></option>___<BR><option
value="songpieces.htm target="_frame"><B>Sing It Out</B></option><BR><option
value="<B>http://www.lissaexplains.com/fun.shtml</B>"><B>Fun Stuff</B></option><BR><option
value="<B>http://www.lissaexplains.com/cursor.shtml</B>"><B>Lissa's Cursors</B></option><BR><BR></select><BR></form>

MaGiCSuN
07-03-2003, 07:45 PM
first take out all the <B></B> tags in your code at the parts where it says "value=url" because they have no use. like value="<B>http://bla.html</B>" it doesn't work there, it has no function. It only has a function if it's something that is showing on yur site like the name of the option <option>NAME</option> could be <option><B>NAME</B></option>

secondly you add this after it:

<iframe name="foreal" frameborder="0" height="#" width="#"></iframe>

and change # to numbers. now the pages will be targetted to the iframe

Love,
Mirna

grkgrlie
07-03-2003, 07:46 PM
yay thank you!! *hug* ^_^