Click to See Complete Forum and Search --> : Select onChange loading in an Iframe


GreyFaerie
10-08-2003, 07:59 PM
Ive been working at this for hours and i cant figure it out... I have a form and i have used to onChange element so that when you select an option from the drop down menu it goes to that page without you having to click 'go'. Anyway... i just want the page to load in an iframe next to the form. I have done this before and it worked fine, but no matter what i do with this one it keeps opening a new page! Anyway... here is the code i am using (the form and the iframe) they are actually in a table but i will just copy the part of the code that is important

<iframe src="/images/PetColours.jpg" scrolling="no" name="petpets" width="160" height="200" frameborder="0">
</iframe>
</td>
<td width="196" valign="top"><table width="179">
<tr>
<td height="36" align="center" valign="top">
<form method="post" target="petpets" action="">
<SELECT ONCHANGE="location = this.options[this.selectedIndex].value;">
<OPTION VALUE="http://images.neopets.com/items/scarypet_abnormal_snowball.gif">Abominable Snowball</option>
<option value='3'>Acko</option>
<option value='4'>Airax</option>
. . . .

</select></form>


thanks!

pyro
10-08-2003, 08:55 PM
<select onchange="top.framename.location.href = this.options[this.selectedIndex].value;">