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!

popup window

Status
Not open for further replies.

transtech

Programmer
Aug 21, 2001
23
0
0
US
Hi all,

i have a main window that has a link which will pop up a small window when clicked. There are some radio buttons in the popup window, so the value of the text box in the main window is going to be depends on what you choose from the popup window.
Can some one please tell me how to do this? I'll appreciate very much....

thanks,

Transtech
 
well, if you opened the popup something like this...:
Code:
<script language=&quot;javascript&quot;><!--
newWindow = window.open(&quot;blah.html&quot;);
then you could do something like this:
Code:
var choice1 = newWindow.document.formName.radioName.value;
var choice2 = newWindow.document.formName.radioName2.value;
if (choice1 == &quot;true&quot;)
document.formName.textboxName.value = &quot;whatever u want&quot;;
elseif (choice2 == &quot;true&quot;)
document.formName.textboxName.value = &quot;something else&quot;;
else
document.formName.textboxName.value = &quot;you get the idea&quot;;
//--></script>

hope this helps The pen is mightier than the sword.
 
oops, did that too fast, the font in bold is the corrections.
var choice1 = newWindow.document.formName.radioName.checked;
var choice2 = newWindow.document.formName.radioName2.checked;

hope it helps The pen is mightier than the sword.
 
Code:
else if
Code:
 (choice2 == &quot;true&quot;)

I'm not sure about the exact code you want, but the syntax above is more or less corrected.
 
right, lol, told ya I did that too fast. The pen is mightier than the sword.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top