/ Published in: jQuery
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
$(document).ready(function() {
$("#mainForm").change(function() {
console.log("changed...");
var data = $(this).serialize();
console.log(data);
$("#results").load("test2.cfm?"+data);
})
})
</script>
</head>
<body>
<form id="mainForm">
name: <input type="text" name="name" /><br/>
age: <input type="text" name="age" /><br/>
gender:
<select name="gender">
<option value="m">Male</option>
<option value="f">Female</option>
</select><br/>
foo: <input type="radio" name="foo" value="1">One<br/>
<input type="radio" name="foo" value="2">Two<br/>
<input type="radio" name="foo" value="3">Three<br/>
goo: <input type="checkbox" name="goo" value="1">One<br/>
<input type="checkbox" name="goo" value="2">Two<br/>
<input type="checkbox" name="goo" value="3">Three<br/>
<p>
<input type="submit">
</form>
<div id="results">
</div>
</body>
</html>
Comments
 Subscribe to comments
                    Subscribe to comments
                
                