AndyPSV Posted January 15, 2012 Share Posted January 15, 2012 WHEN not empty #t AND not empty #answer AND #t is NOT <% $_.Title %> AND #answer is not <% $_.WriteApost %> if(!empty("#t") AND !empty("#answer") AND ... you get the point; how to modify the code below? <script type='text/javascript'> jQuery(function ($) { $('#t,#answer').bind("focus blur change keyup", function() { var t = $("#t").val(), answer = $("#answer").val(); $(".sanswer").prop("disabled", !t || !answer && (t === "<% $_.Title %>" && answer === "<% $_.WriteApost %>")); }).blur(); }); </script> Quote Link to comment https://forums.phpfreaks.com/topic/255097-jquery-how-to-activate-the-button-when-not-empty-first-non-empty-second/ Share on other sites More sharing options...
AndyPSV Posted January 17, 2012 Author Share Posted January 17, 2012 http://jsfiddle.net/AndyPSV/VkPXz/2/ help me to fix it Quote Link to comment https://forums.phpfreaks.com/topic/255097-jquery-how-to-activate-the-button-when-not-empty-first-non-empty-second/#findComment-1308504 Share on other sites More sharing options...
AndyPSV Posted January 20, 2012 Author Share Posted January 20, 2012 nobody knows? Quote Link to comment https://forums.phpfreaks.com/topic/255097-jquery-how-to-activate-the-button-when-not-empty-first-non-empty-second/#findComment-1309532 Share on other sites More sharing options...
UrbanDweller Posted January 20, 2012 Share Posted January 20, 2012 Well congratulations you just made me as confused as you Quote Link to comment https://forums.phpfreaks.com/topic/255097-jquery-how-to-activate-the-button-when-not-empty-first-non-empty-second/#findComment-1309699 Share on other sites More sharing options...
AndyPSV Posted January 20, 2012 Author Share Posted January 20, 2012 I've found already the issue it was lacking ' sign with disabled. although, I've got another problem; http://jsfiddle.net/AndyPSV/VkPXz/4/ put something in both brackets, it would work thanks Quote Link to comment https://forums.phpfreaks.com/topic/255097-jquery-how-to-activate-the-button-when-not-empty-first-non-empty-second/#findComment-1309701 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.