Hello,
I have an input box which i use to add items to a table in the db.
It looks like this:
<td>
<form class="insCat" action="#" name="insertCat">
<input name="categorienaam" type="text">
<input class="insert" type="submit" value="nieuwe categorie">
</form>
</td>
And i handle it like this in jquery
jQuery(".insert").click(function(){
str = jQuery("form.insCat").serialize();
console.log(str);
jQuery.ajax({
type: "POST",
data: str + "&cmd=insert",
url: "ajax_handler.php",
success: function(msg){}
});
jQuery("div.result").empty();
});
But i can't see anything in my log since the page is refreshed after each insert. Which i don't want.
Are there ways around this?