in what capacity do you need the website?
... do you want to go to said site?
...... navigate in current browser window? popup window? iframe?
...... navigate to site on selection or on a button click?
... do you want to store the site?
...... store in database?
...... store in variable?
The method below I will show you how to navigate to the site by making a popup window when the option is selected.
Code:
__DOC_TYPE__
<html>
<head>
<title>TITLE</title>
<script type="text/javascript">
function goTo(var url='')
{
if(isNull(url) || url == '') {alert("The URL is not valid, contact the system administrator");}
else {
window.open(url, 'popUpWin','menubar=1,toolbar=1,status=1,resizable=1,left=0,top=0').focus();
}
}
</script>
</head>
<body>
<form name="frm" action="void(0);">
<label>
Website:
<select name="categories" onchange="goTo(this.value);return false">
<option value="" selected="selected>– Select Website –</option>
<option value="http://www.dynamicdrive.com">Dynamic Drive</option>
<option value="http://www.google.com">Google</option>
<option value="http://www.yahoo.com">Yahoo</option>
</select>
</label>
</form>
</body>
</html>
Bookmarks