Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pop-up window by clicking on radio button

Status
Not open for further replies.

riffy

Programmer
Mar 29, 2001
106
0
0
US
Hi guys,

I have a question. I have a form with 5 questions, each question with 4 radio buttons. The radio buttons all have the name corresponding with the question number. So for question 1 the radio buttons are of the type
Code:
<input type=&quot;radio&quot; name=&quot;question1&quot; value=&quot;full_disagree&quot;>

my question is that when the user clicks on either full_disagree or part_disagree, a pop-up window should come up with a textarea so the user can explain why he/she disagrees. That info should then be stored back into the original form. I know there will have to be an onClick action on the 2 radio buttons for each question but what does the function entail?

Thanks
Arif
 
well first here is some popup code for you to look over
faq216-2034

second you will need to pass the values filled in on the popup and then retain the old values in teh original page.
this can be done in the easiest way via server side scripting like ASP :) but you can do it via the URL and the get method in your form method. you can see more on that here as well.

seeing as you have a textarea though passing the value through the url will be tricky due to constraints on the size of the querystring being passed so I would deffinetly suggest going server side with this.

for the radio button call to the popup
just do a onClick=&quot;popup()&quot; in the input tag _______________________________________________
[sub]{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }[/sub]
_______________________________________________
for the best results to your questions: FAQ333-2924

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top