diload
10-15-2009, 03:17 PM
EDIT: Nevermind got it fixed(:
Hello i got a piece of code here in jQuery:
$("#cht").submit(function() {
var besked = $("#text").val();
$.ajax({
type: "POST",
async: false,
url: "./_libs/chat.php",
data: "msg=sendmsg&sender=testsender&modtager=ligemeget&besked="+besked,
success: function(data){
alert(data); // Only for Debugging
}
});
});
And i can't get the form to stop refreshing the site everytime i submit it
i tried both return false; and event.preventDefault(); and no one of them worked for me :( so any help would be appreciated thanks (:
Regards
Hello i got a piece of code here in jQuery:
$("#cht").submit(function() {
var besked = $("#text").val();
$.ajax({
type: "POST",
async: false,
url: "./_libs/chat.php",
data: "msg=sendmsg&sender=testsender&modtager=ligemeget&besked="+besked,
success: function(data){
alert(data); // Only for Debugging
}
});
});
And i can't get the form to stop refreshing the site everytime i submit it
i tried both return false; and event.preventDefault(); and no one of them worked for me :( so any help would be appreciated thanks (:
Regards