P Lemon
03-07-2006, 05:38 PM
drop down menus heres the code and a question, i want when lets say they select england it goes to www.uk.mysite.com (http://www.uk.mysite.com) can any one tell me how to achive this?
<!-- start of country list -->
<<option>Canada (english)</option><option>Canada (french)</option><option >France</option><option>Germany</option<option>Ireland</option><option>Spain</option>
<option>United Kingdom</option><option selected="selected">United States of America</option>
<!-- end of country list -->
Premier
03-08-2006, 01:08 AM
You can do that with javascript and onchange.
<html>
<head>
<title></title>
<script language="JavaScript1.2" type="text/javascript">
<!-- Begin
function changeSel(sel) {
var val = sel.options[sel.selectedIndex].value;
var targetWin;
targetWin = "_top";
if (val != '') {
window.open(val,targetWin);
}
}
// End -->
</script>
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000ff" alink="#ff00ff" vlink="#666666">
<form>
<select name="gowhere" onchange="changeSel(this)" style="font-size:10px">
<option value="" style="color:#333333" selected="selected">--- select country ---</option>
<!-- start of country list -->
<option value="http://www.ca.mysite.com/en/">Canada (english)</option>
<option value="http://www.ca.mysite.com/fr/">Canada (french)</option>
<option value="http://www.fr.mysite.com">France</option>
<option value="http://www.ge.mysite.com">Germany</option>
<option value="http://www.ir.mysite.com">Ireland</option>
<option value="http://www.sp.mysite.com">Spain</option>
<option value="http://www.uk.mysite.com">United Kingdom</option>
<option value="http://www.mysite.com">United States of America</option>
<!-- end of country list -->
</select>
</form>
</body>
</html>
P Lemon
03-08-2006, 01:00 PM
hey mike thanks alot you save my butt
Premier
03-08-2006, 01:12 PM
No problem. It's what I use for my "quick links" just modified slightly for your needs.