How do I pass the values of txtname and tel as variables to the .load???
$(document).ready(function(){
$("#add").click(function(){
$("#result").load("add.php", {name: #txtname});
});
});
The html:
<p>Name:<input type="text" name="name" value="" id="txtname" /></p>
<p>Telephone:<input type="text" name="tel" id="tel" value="" /></p>
<input type="submit" value="Submit" id="add" />