Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
</head>
<body>
<form name="jumpy">
<select id="example" size="1" onchange="gone('example')">
<!-- CHANGE THE BELOW URLS TO YOUR OWN-->
<option selected value="http://www.google.com">Google</option>
<option value="http://www.dynamicdrive.com/forums/" selected >http://www.dynamicdrive.com/forums/</option>
<option value="http://www.lycos.com">Lycos</option>
<option value="http://www.AltaVista.com">AltaVista</option>
</select>
<input type="button" name="test" value="Go!" onClick="gone('example')">
<br /><br />
<select id="example2" size="1" onchange="gone('example2','external')">
<!-- CHANGE THE BELOW URLS TO YOUR OWN-->
<option value="http://www.google.com">Google</option>
<option value="http://www.dynamicdrive.com/forums/" selected >http://www.dynamicdrive.com/forums/</option>
<option value="http://www.lycos.com">Lycos</option>
<option value="http://www.AltaVista.com">AltaVista</option>
</select>
<input type="button" name="test" value="Go!" onClick="gone('example2','external')">
</form>
<iframe id="external" style="width:95%;height:400px" ></iframe>
<script language="javascript">
<!--
//Drop-down Document Viewer- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com
function gone(id,ifr){
var sel=document.getElementById(id),url;
if (sel&&sel.value){
url=sel.value;
if (document.getElementById(ifr)){
document.getElementById(ifr).src=url;
}
else if (gone.w){
gone.w.location=url;window.open(url);
gone.w.focus();
}
else {
gone.w=window.open(url);
}
}
}
//-->
</script>
</body>
</html>
Bookmarks