I am new to jquery and I think it is simple, but I am struggling, and google does not seem to help ...
I have a basic form ...
<form>
First Name: < input type="text" name="firstName" id="firstName" />
Surname: < input type="text" name="surname" id="surname" />
<input type="submit" id="submit" value="submit"/>
</form>
Now that the submit button is clicked, I want to go to the URL, but then add the froms values to the url string (but not using the form = get method). I want this to happen
when you click submit http://myurl.com/index.html?params=firstNamevalue*surnamevalue
I hacked using jquery, but where I go up is something like this ...
< script src="http://www.google.com/jsapi" type="text/javascript">< /script>
< script type="text/javascript">
google.load("jquery", "1.3.1");
</script>
< script type="text/javascript">
var = firstName $("#firstName").val();
var = surname $("#surname").val();
$('#submit').click(function(){
window.location = ???;
});
< /script>
I hope I was very clear - I would really appreciate any help!
Andy
tbwcf source
share