Welcome to WebmasterWorld Guest from 54.198.46.95

Forum Moderators: open

Message Too Old, No Replies

Possible to break out?

iframes, drop down list

     
2:57 pm on May 10, 2003 (gmt 0)

10+ Year Member



I have a site with iframes that has a drop down list in it (to photo pages). I have 1 item that belongs on the drop down list because of the category (it doesn't belong in the table list), but I want it to break this link ONLY out of the iframe and either go directly to that site or open a new window to that site. Is this possible?
3:11 pm on May 10, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome to WebmasterWorld MsGini,

Sure you can. It will take just a little bit of Javascript. You can use this to make a new window:

function breakIframe(){
var targetURL = formName.selectName.options[formName.selectName.selectedIndex].value;
window.open(targetURL, 'categoryWindow', 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width=400,height=300');
}

You can have a select something like this:

<form name="formName">
<select name="selectName" onChange="breakIframe()">
<option value="http://www.yahoo.com">yahoo</option>
<option value="http://www.google.com">google</option>
</select>
</form>

 

Featured Threads

Hot Threads This Week

Hot Threads This Month