vmicchia Posted March 25, 2011 Share Posted March 25, 2011 Ok so what I have is a small code to enable a submit button when a selection is made in both radio button groups. But it's only validating for one of the groups. Here's the code: <script> function fCheck() { document.orderCushionForm.addToCart.disabled =(document.orderCushionForm.fabricSelect.checked <?php if($assoc['Buttons'] == 'Y'){echo '&& document.orderCushionForm.buttonSelect.checked';} ?>); } </script> It's run in each of the radio button groups with this: onclick=javascript:fCheck(); Also what would be the javascript code to disable the submit button beforehand so if a user had java disabled the button wouldn't be disabled? Link to comment https://forums.phpfreaks.com/topic/231689-radio-button-validation-problem/ Share on other sites More sharing options...
Adam Posted March 28, 2011 Share Posted March 28, 2011 Have you checked the source to make sure the second argument is added when you expect $assoc['Buttons'] == 'Y' ? Link to comment https://forums.phpfreaks.com/topic/231689-radio-button-validation-problem/#findComment-1193219 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.