MSK7
06-30-2009, 12:55 PM
Hello all,
I have a form in which there are two radio buttons .
On selecting the first radio button1 , two textboxes are displayed ( textbox1 & textbox2 ).
& On selecting the second radio button2 only One textbox is
displayed (textbox1) & another one (textbox2) get hidden .
what i am trying to do is that when radio button1 is selected
& so two textboxes are displayed,
then Onsubmit throw alert for two textboxes seperately , to
Enter value in them if this text boxes are blank .
But if radio button2 is selected then throw alert for Entering
value for only one text box (textbox1) if its value is blank ,
& Skip alert throw for the another one hidden textbox(textbox2) .
please suggest me how i can achieve this using JS .
Thanks & Regards
I have a form in which there are two radio buttons .
On selecting the first radio button1 , two textboxes are displayed ( textbox1 & textbox2 ).
& On selecting the second radio button2 only One textbox is
displayed (textbox1) & another one (textbox2) get hidden .
what i am trying to do is that when radio button1 is selected
& so two textboxes are displayed,
then Onsubmit throw alert for two textboxes seperately , to
Enter value in them if this text boxes are blank .
But if radio button2 is selected then throw alert for Entering
value for only one text box (textbox1) if its value is blank ,
& Skip alert throw for the another one hidden textbox(textbox2) .
please suggest me how i can achieve this using JS .
Thanks & Regards