Log in

View Full Version : Looking for a code that will fix..



JayQue
06-08-2008, 05:22 PM
Hi! So, I'm working on a new webdesign for my own personal use and I'm using drop-down link boxes as well as iFrames, but I've noticed now that my drop-down links won't load in my iFrames, is there a way to fix it that I'm just not seeing?

I haven't used drop-downs in a long time, and usually my iframe links are just target="iframename"

this is how it looks:

<form><select name=select size="1" style="background-color:000000; font size:11pt; font-family:verdana;color:white"
onchange="location.href=(form.select.options[form.select.selectedIndex].value)" target="mycontent">

<option value="http://freehostia.com" target="mycontent">freehostia</option>
<option value="http://mail.yahoo.com" target="mycontent">y! mail</option>
<option value="http://www.backstreetboys.com" target="mycontent">Backstreet Boys</option>
</select></form>




**// END OF DROP-DOWN CODE //**



<iframe name="mycontent" src="http://llamatracks.freehostia.com/splash.htm" border="0" frameborder="0" bordercolor="#FFFFFF" width="660" height="320" marginwidth="0" marginheight="0" scrolling="auto"></iframe>



**// END OF IFRAME CODE //**

Jas
06-08-2008, 07:13 PM
When posting code, please put the code in
tags.

Try replacing this:

onchange="location.href=(form.select.options[form.select.selectedIndex].value)" target="mycontent"
with this:

onchange="mycontent.location=form.select.options[form.select.selectedIndex].value"

JayQue
06-09-2008, 02:01 AM
will try to remember that one... the Code thing. But THANK YOU SO MUCH. I had a suspicion it was the location part, but I wasn't quite sure how to reword it! THANKS! Loveeee you! Wow...