jquery - Pop-up on form validation failed -
i using below code validate certaim field.
var x = document.forms["myform"]["obs"].value; if (x == null || x == "") { alert("all fields mandatory.."); return false; }
i try replace alrt action modal 2 buttons : return field , leave empty
try zebra dialog. useful plugin. http://stefangabos.ro/jquery/zebra-dialog/
var x = document.forms["myform"]["obs"].value; if (x == null || x == "") { $.zebra_dialog('all fields mandatory..', { 'type': 'question', 'title': 'custom buttons', 'buttons': ['return field', 'leave empty'], }); return false; }
Comments
Post a Comment