I've tried to send my form without input[submit] but its not working properly.
Tutorial Address : Link
I have used jquery validation plugin.
I put image button instead of input[submit]. And its not working. I want to assing my image to the validate function than send function.
Some advices?
Here is the code
form
<form id="kullaniciKayit" action="" method="post" novalidate>
<input type="hidden" name="islem" value="uyeKayit">
<input type="hidden" name="fbId" value="<?php echo $fidd ?>">
<ul>
<li><input type="textbox" class="selector" style="background:transparent;" name="objAd" value="<?=$adSoyad?>" disabled></li>
<li><input type="textbox" class="selector" style="background:transparent;" name="objEposta" value="<?=$eposta?>" disabled></li>
<li><input type="textbox" class="selector" style="background:transparent;" name="objDtarih" placeholder="Gün/Ay/Yıl" ></li>
<li><input type="textbox" class="selector" style="background:transparent;" name="objAdres"></li>
<li><input type="textbox" class="selector" style="background:transparent;" name="objTel"></li>
</ul>
<div class="form-gonder">
<a class="formGonderBtn" href="" target="_parent"><img src="../img/post-btn.png"></a>
</div>
</form>
jquery
<script type="text/javascript" src="../js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../js/jquery-ui-1.10.3.js"></script>
<script type="text/javascript" src="../js/jquery.validate.js"></script>
validation code
<script>
// When the browser is ready...
$(function() {
// Setup form validation on the #register-form element
$("#kullaniciKayit").validate({
// Specify the validation rules
rules: {
objAdres: "required",
},
// Specify the validation error messages
messages: {
objAdres: "Lutfen Adres Giriniz",
},
submitHandler: function(form) {
form.submit();
}
});
});
</script>