Jquery вопрос
20 повідомлень
#15 років тому
$(document).ready(function(){
$("form#submit").submit(function() {
// we want to store the values from the form input box, then send via ajax below
var comment = $('#comment').attr('value');
var from = $('#from').attr('value');
var to = $('#to').attr('value');
//var lname = $('#lname').attr('value');
$.ajax({
type: "POST",
url: "/no_header/comment_profile/",
data: "comment="+ comment +"&to="+ to +"&from="+ from,
success: function(){
$("#quickReply").animate({"height": "toggle"}, { duration: 1000 });
$("#msg").animate({"height": "toggle"}, { duration: 1000 });
$('#back').html("asdad");
}
});
return false;
});
});
$('#back'


327 повідомлень
132 повідомлення
#15 років тому
success: function (data, textStatus) {
alert(
'data = '+data+'\n'+
'textStatus = '+ textStatus
);
}
20 повідомлень
#15 років тому
Ребят спасибо