<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

you must set "url" variable in your goto function, it is blank now i guess.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.