instant karma
06-27-2003, 02:09 AM
I have a drop-down menu on my page with iframes, and a drop down menu that is SUPPOSED to target frames, but it doesn't. I think I've done everything right, but here, you can check and see for yourself...
<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="inline");
}
}
//-->
</script>
<form name="lissamenu2">
<select name="menu" style="background-color: #cccccc ;
font size=10 ; font-family: century gothic; color:#000000"
size="1" onchange="jump(this.form)">
<option value="0">McCartney</option>
<option value="0"></option>
<option value="http://www.pixelfairy.net/colleen/inline">Main</option>
<option value="http://www.pixelfairy.net/colleen/litter.html">Litters</option>
<option value="http://www.pixelfairy.net/colleen/single.html">Singles</option>
</select>
</form>
MaGiCSuN
06-27-2003, 11:38 AM
code looks fine to me
but is your iframe also named "inline" and not "index2.html" like you have on your page under the WWW button below your post?
if it still doesn't work then can you show us the page where you have got it uploaded, IF you got it uploaded. If not, can you post the whole code including iframes and dropdownmenu here?
thanks
Love,
Mirna
Jiggawot
06-27-2003, 01:39 PM
On all the '<option value="link"></option>' things, can;t you just do this?
<option value="link" target="framename"></option>
I'm not sure, I've never used dropdown menus they're evil (meaning I never can work them.) =D
instant karma
06-27-2003, 03:46 PM
Okay, I got the page uploaded, you can take a look at it here (http://www.pixelfairy.net/colleen/street.html). The drop-down menu either opens up in a new window or doesn't open up at all.
MaGiCSuN
06-27-2003, 06:15 PM
you really didn't named the iframe the same as the "target" link. I also made some changes in your coding, you had stuff in the <head> that didn't belonged there and you had two body tags. so here it is:
<html>
<head>
<title>_______give my regards to broad street______</title>
</head>
<body background="grid.jpg">
<img style="position:absolute; top:60px; left:19px; width:340;
height:500" src="back2.jpg">
<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="inline");
}
}
//-->
</script>
<form name="lissamenu2">
<select name="menu" style="background-color: #cccccc ;
font size=10pt ; font-family: century gothic; color:#000000"
size="1" onchange="jump(this.form)">
<option value="0">McCartney</option>
<option value="0"></option>
<option value="http://www.pixelfairy.net/colleen/inline">Main</option>
<option value="http://www.pixelfairy.net/colleen/litter.html">Litters</option>
<option value="http://www.pixelfairy.net/colleen/single.html">Singles</option>
<option value="http://www.pixelfairy.net/colleen/misc.html">Extra</option>
<option value="http://www.pixelfairy.net/colleen/me.html">Inside</option>
<option value="http://www.pixelfairy.net/colleen/links.html">Leave</option>
</select>
</form>
<iframe src="inline.html" name="inline" width="600" height="400" style="border: 1 dotted #000000" style="position:absolute; left:380px; top:150px;" ALLOWTRANSPARENCY="true"></iframe>
</body>
</html>
instant karma
06-27-2003, 07:11 PM
Yay! It worked, thank you!