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

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -