View Full Version : frame targets


Angel17
07-16-2003, 02:30 PM
I used target links on my frames, but it wont work is something wrong with my html?

<script language="javascript">
function jump(form) {
var myindex=form.menu.selectedIndex
if (form.menu.options[myindex].value != "0")
{
window.open(form.menu.options[myindex].value,
target="left.html");
}
}
//-->
</script>

<form name="L1">
<select name="menu" style="background-color: #000000 ;
font size=13 ; font-family: ms gothic; color:#ccccff"
size="1" onchange="jump(this.form)">

<option value="0">Links</option>
<option value="0"></option>
<option value="url here">1</option>
<option value="url here">2</option>
<option value="url here">3</option>

</select>
</form>

kittycat
07-16-2003, 04:18 PM
<script language="javascript">
function jump(form) {
var myindex=form.menu.selectedIndex
if (form.menu.options[myindex].value != "0")
{
window.open(form.menu.options[myindex].value,
target="left.html");
}
}
//-->
</script>

You need to double check the bold part of the code above, and make sure that you have your target right. It should be the exact same as the name of your frame, and most likely won't include a file extension on the end.

Angel17
07-17-2003, 01:53 PM
hmm...it pops up a new page, it doesnt make the left page go there, and the page up there, thats the name of the page (left.html) should I just put left instead of left.html?

pb&j
07-17-2003, 02:30 PM
somewhere in your FRAME page coding you should have some NAME values specified. the TARGET value in your coding above should be the same value as one of those NAME values so it knows where to open the link up into.