homepage Welcome to WebmasterWorld Guest from 54.167.244.71
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Possible to break out?
iframes, drop down list
MsGini




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

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?

 

korkus2000




msg:1469969
 3:11 pm on May 10, 2003 (gmt 0)

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>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved