I'm probably not writing this the proper way, but I have code that almost works.
- $("#submit_button").click(function(){
- $(".product").each(function(){
- if ($(this).val() == '' ) {
- $("#product_failed").css("display", "inline");
- $("#myForm").submit(function(){
- return false;
- });//end submit false
- }else{
- $("#product_failed").css("display", "none");
- $("#myForm").submit();
- };//end if
- });//end .product each function
- });//end submit button click
The error message shows and hides properly based on whether the select menu value is "" or not, but if the value is not "" the form doesn't submit. Any help with context would be greatly appreciated.
Thanks in advance,
Twitch