hello
what this code have error:
$("#submit").click(function(){
var dataObj = $(this).closest('form').serializeArray();
$.ajax({
type: "POST",
url: '/zig-co/index.php/home/connect',
data: dataObj,
cache: false,
success: function(){
$('#connect').html("<div id='message'></div>");
$('#message').html("<h2>Ùرم شما با موÙقیت ارسال شد.</h2>").append("<p>بزودی با شما تماس خواهیم گرÙت.</p>").hide().fadeIn(1500, function(){
$('#message').append("<div id='checkmark'></div>");
});
},
error: function(x,y,z) {
alert(x+'\
'+y+'\
'+z);
}
});
return false;
});
html:
<div id="connect">
<form action="" method="POST">
name: <input type="text" name="name">
<p>
</p>
mail: <input type="text" name="email">
<p>
</p>
tell: <input type="text" name="phone">
<p>
</p>
text:
<p>
</p>
<textarea name="text" rows="20" cols="40"></textarea>
<input type="submit" name="submit" id="submit" value="send">
</form>
</div>
error:
[object Object]
error
Not Found
that true work on the local server(xampp) but not work to host server and get me error: