0
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
label {
display:block;
}
</style>
<script type="text/javascript">
function goTo()
{

var city = document.forms[0].city.value;
var state = document.forms[0].state.value;
window.parent.location.href=url+'?city='+city+'&state='+state;
return false;
}
</script>
</head>
<body>
<form action="" method="get" onsubmit="return goTo()">

<label for="city">Enter the city:
<input type="text" name="city" id="city">
</label>
<label for="state">Enter the state:
<input type="state" name="state" id="state">
</label>
<input type="submit" value="Submit">
</form>
</body>
</html> 

hello

what i m trying to do is when i press submit, it will redirect me to a url with the values that i submited in the form ..

what wrong i m doing .. thanks in advance

2
Contributors
1
Reply
3
Views
4 Years
Discussion Span
Last Post by urtrivedi
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.