Dropdown javascript / jquery form validation debugging help needed -


i have following jsfiddle setup:

http://jsfiddle.net/xcca2/

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();      }); 

http://jsfiddle.net/xcca2/4/


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -