Im coding php and i want to use image-button to call function.
$del= "<input type='image' src='delete.png' name='delete_cat' value='{$cat_name}' onclick='delete_exe(this.form,this.name,this.value)' >";
This button is into a submit form
<form method="post" action="caffe_menu_category_post.php">
/form>
My problem is that when js function(delete_exe()
) call and execute, then have auto-submit.
I don't want that. Is there any solution or alternative code?
Can i set submit off for my button?
Thanks in advance.
ps in my code i submit form with submit input
input type = "submit" value = "Submit Your Entries">