Dropdown javascript / jquery form validation debugging help needed -
i have following jsfiddle setup:
basically when form submitted, size select dropdown validated make sure selection has been made. if valid size has been selected form posted.
if invalid selection made, alert box "an invalid size has been selected" should popup.
please can debugging this.
nb: there many forms on page, , prefer uses classes rather id's there commented out html, form has been set class, works within form becomes clickable, not want. button should trigger validation.
thanks
try
$(".wq").live( "click", function () { alert("test"); if($("select").val()!="") alert("not empty"); else{ alert("select val"); return false; } // $(this).submit(); });
Comments
Post a Comment