User has html-form, then user fills all field and data transferred to PHP script. How do would data send, but not refresh html page?
A:
If you don't want the page to be refreshed and submit data, you will have to use the ajax for that, have a look at its tutorial at w3school.com
Sarfraz
2010-02-24 18:05:28
thank, I just thought that this problem is solved without AJAXPS thank for link
rebel_UA
2010-02-24 18:13:33
@rebel: you are welcome :)
Sarfraz
2010-02-24 18:14:37
A:
If you want to send the data without refreshing the page, you'll want to do an ajax submit. The easiest way to do this is via the jQuery AJAX Library. A quick example could be:
//example from the jQuery API docs.
$.ajax({
type: "POST",
url: "some.php",
data: $("#form_to_submit").serialize(),
success: function(msg){
alert( "Data Saved: " + msg );
}
});
Mike Trpcic
2010-02-24 18:10:31
thank, but I not fully understood, can You write simple html-form with such use jQuery?
rebel_UA
2010-02-24 18:28:51
You would use jQuery to handle the submitting of a form. Just google for "ajax form submit jquery" and you'll find a decent example or two.
Mike Trpcic
2010-02-24 19:14:57