jwk811 Posted November 11, 2006 Author Share Posted November 11, 2006 YES! that did it! thank you very much! Link to comment https://forums.phpfreaks.com/topic/26265-how-can-i-check-to-see-if-a-radio-button-was-given-input/page/2/#findComment-123174 Share on other sites More sharing options...
Telemachus Posted November 11, 2006 Share Posted November 11, 2006 You're welcome, glad it helped. It just dawned on me this morning that I could have set paymentType to isValid at first and saved the if statement before the switch, but like I said, it was only meant to get you started with your own ideas. Link to comment https://forums.phpfreaks.com/topic/26265-how-can-i-check-to-see-if-a-radio-button-was-given-input/page/2/#findComment-123185 Share on other sites More sharing options...
jwk811 Posted November 11, 2006 Author Share Posted November 11, 2006 would you know how i could add an email check in there? to check if the email and confirm email matches or not then set a different alert for that saying emails do not match... Link to comment https://forums.phpfreaks.com/topic/26265-how-can-i-check-to-see-if-a-radio-button-was-given-input/page/2/#findComment-123193 Share on other sites More sharing options...
Telemachus Posted November 11, 2006 Share Posted November 11, 2006 Well, let's say you named them email1 and email2, you could do something as easy as [code]if (document.frmCheckout.email1.value != document.frmCheckout.email2.value) alert("Emails do not match.");[/code] I'd suggest just initializing a variable, say errMsg, and adding specific information to it for each error encountered, and then spitting them all in one alert at the end. Link to comment https://forums.phpfreaks.com/topic/26265-how-can-i-check-to-see-if-a-radio-button-was-given-input/page/2/#findComment-123199 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.