PDA

View Full Version : help with iframe links


benastan
02-17-2003, 03:26 AM
HELp, i am trying to make a site jump that jumps from page to page. the index looks like this:

<html>
<head>
<style type="text/css">
<!--
body {background-color:black;color:white;font-size:10pt;}
a:link {background-color:black;color:white;font-size:10pt;}
a:visited {background-color:black;color:white;font-size:10pt;}
a:active {background-color:black;color:white;font-size:10pt;}
a:hover {background-color:black;color:red;font-size:11pt;}
-->
</style>
<title>Pirate Monkey</title>
</head>
<body>
<iframe id="siteJump" src="sitejump.html" width="300" height="100"></iframe>
<iframe id="signedInStatus" src="cgi-bin/userstatus.cgi" width="250" height="110" style="position:absolute;top:10;left:600;z-index:5;"></iframe>
</body>
</html>

when change the site in the site jump it jumps to the page WITHIn the site jump iframe. can someone tell me how to make the link open in the window and not the iframe. THNX

glenngv
02-17-2003, 09:09 AM
do you mean when a link in the siteJump iframe is clicked, the page will be opened in the main window where the iframe is?

<a href="somelinks.htm" target="_top">Some links</a>

benastan
02-17-2003, 04:40 PM
not exactly...

what im doing is using a select box with "onChange" that calls a script which goes to the value of the option selected. My problem is that i cant target the main window using this sscript heres the script:


<script language='JavaScript'>
<!-- ;
function go(){
window.location = document.form1.website.options[document.form1.website.selectedIndex].value;
}
// end hide -->
</script>

glenngv
02-18-2003, 08:47 AM
top.location.href = document.form1.website.options[document.form1.website.selectedIndex].value;

or:

window.open(document.form1.website.options[document.form1.website.selectedIndex].value,"_top");