[eluser]MaartenDeGroote[/eluser]
I figured this one out. Well, not exactly but I found a solution.
All i did was changing the following code:
Code:
$(document).ready(function(){
$("form").submit(function(){
var str = $(this).serialize();
$.ajax({
type : "POST",
url : "ajax/form",
data : str,
success : function(msg){
alert(msg.message)
}
}, "json");
return false;
});
});
to
Code:
$(document).ready(function(){
$("form").submit(function(){
var str = $(this).serialize();
$.ajax({
type : "POST",
url : "ajax/form",
data : str,
dataType : "json",
success : function(msg){
alert(msg.message)
}
});
return false;
});
});
Now it works perfectly.