Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

BBS: Re: Forms and Multiple Frame Targets: READ THIS ONE, IGNORE PREVIOUS - September 13, 1998 at 14:13:37

You are here: irt.org | BBS | Re: Forms and Multiple Frame Targets: READ THIS ONE, IGNORE PREVIOUS [This BBS is closed]

Posted by Martin Webb on September 13, 1998 at 14:13:37:

In Reply to: Forms and Multiple Frame Targets: READ THIS ONE, IGNORE PREVIOUS posted by Kevin McNamara on September 11, 1998 at 16:29:22:

: Works great, until we put an option in the list that loads an external link. We can't get it to go to the top of the browser and break out of our own frameset.

: If I try to put a TARGET="_top" in the <OPTION> tag, the HTML editor flags it as improper and the function above ignores it.

: Is there some way I can pass a TARGET="_top" from an <OPTION> and have it recognized by the above function or something similar, and have a null target load in the Homepage frame?

Form select fields have two pieces of data for each option: text and value, theres room to store a thrid item - so cheat:

<SCRIPT LANGUAGE="JavaScript">
function surfto (selectlist) {
var url = selectlist.options[selectlist.selectedInde].value
if (url.indexOf ('http://')
top.location.href = selectlist.options[myindex].value;
else
location.href = selectlist.options[myindex].value;
}
</SCRIPT>

<FORM>
<SELECT NAME="myOption" onChange="sufto (this.name">
<OPTION VALUE="local.htm">Local Page
<OPTION VALUE="http://www.somewhere.com/">Remote Page
</SELECT>
Follow-ups:

You are here: irt.org | BBS | Re: Forms and Multiple Frame Targets: READ THIS ONE, IGNORE PREVIOUS [This BBS is closed]

©2018 Martin Webb