Collecting values from the part-AJAX form with PHP
I currently have a form开发者_如何转开发 with a dropdown box, and when the value in the dropdown changes, a PHP file with some more form elements get loaded via jQuery's $.ajax function into the main form. However when I submit the form (using just the non-AJAX way) the values from the 'ajaxed' area of the form are not included in the $_POST values. Do you know a way of being able to include the AJAX form values when the form is submitted?
Thanks in advance
in your jquery code for the submit functionality. Try using the live() function.
For instance
$("form").live(submit(function() {
$.ajax("page.php",......
..........
});
精彩评论