Jump to content

Radio button validation problem


vmicchia

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.