|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi there,
I have a list box with dates in yyyymmdd format and a button on the form. When I select one of the dates and click the button, I want it to load a webpage in a new window but using the yyyymmdd selected to form the url. Can anyone help? Do I use onclick="..." Much appreciated. Chee... |
|
#2
|
||||
|
||||
|
Try this example. I'm using google's domain with the date at the end of the URL which of course leads to a dead link but you'll get the idea.
Code:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
<!--
function goToURL(dateVal) {
NewWin=window.open("",'newWin','toolbar=yes,location=yes,status=yes,men ubar=yes,scrollbars=yes,resizable=yes');
NewWin.location.href = "http://www.google.com/" + dateVal;
}
//-->
</script>
</head>
<body>
<form name="myForm" method="post" action="" onsubmit="goToURL(this.dateDropdown.value)">
<p>
<select name="dateDropdown">
<option value="20040519">May 19, 2004</option>
</select>
</p>
<p>
<input name="Submit" type="submit" value="Submit">
</p>
</form>
</body>
</html>
__________________
If you found a post of mine helpful, please click on the on my post to add to my reputation.
|
|
#3
|
|||
|
|||
|
many thanks to you this works a treat and it also gets me started in
javascript. thanks again, you've been a great help chee... |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > How to call call a web page from a form button |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|