| Код | $.post('/gruop/add', $('#form_id').serialize(), function(data) { // then the code will be executed at the end of the query // data - response, which returned to the server });
|
или отправь в json:
| Код | ..........
<script type="text/javascript" src="/dev/jquery-1.3.2.js"></script>
<script type="text/javascript" src="/latest/jquery.json-2.2.js"></script> ............. ............. var formData = { "text_cm":$("textarea#text_cm").val() , "email":$("input#email").val() , "name":$("input#name").val() , "validate":$("input#validate").val() };
$.ajax({ type: "POST",
url: "/comments_photo/add", data:'jsonData=' + encodeURIComponent( $.toJSON(formData) ), dataType: "json", success: function(msg) {
if (msg.success_ok > 0) { ........ |
http://www.x0.org.ua/blog/user/1/view/23
|