Passing values from 1 opened pop up back to parent window

Hello guys.

I’ve been struggling on how to make this work.

I have a problem in Javascript when it comes to passing of value in a input type field.


<form action="" method="post>
<input type="text" name="weight" value=""><a href="hw_calculator.html" target="name" onclick="'hw_calculator.html','name','height=270,width=370,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes'); return false;"> calculate </a>


Height Converter (Metric/Standard)
<INPUT type=hidden value="(Math.round((P.value * 0.45359)*100))/100" name=K_expr> 
<INPUT type=hidden value="(Math.round((K.value / 0.45359)*100))/100" name=P_expr> 
<INPUT type=hidden value="(Math.round((F.value * 30.48 + I.value * 2.54)*100))/100" name=C_expr> 
<INPUT type=hidden value="(Math.floor(C.value / 30.48))" name=F_expr> 
<INPUT type=hidden value="(Math.round(((C.value - (Math.floor(C.value / 30.48) * 30.48)) / 2.54)*100))/100" name=I_expr> 
<INPUT type=hidden value="(Math.round(P.value * 0.45359))" name=K_exprrnd> 
<INPUT type=hidden value="(Math.round(K.value / 0.45359))" name=P_exprrnd> 
<INPUT type=hidden value="(Math.round(F.value * 30.48 + I.value * 2.54))" name=C_exprrnd> 
<INPUT type=hidden value="(Math.floor(C.value / 30.48))" name=F_exprrnd> 
<INPUT type=hidden value="(Math.round((C.value - (Math.floor(C.value / 30.48) * 30.48)) / 2.54))" name=I_exprrnd>
<h2>Height Converter</h2>
<table border="0" bgcolor="#FFFF99" cellspacing="6" cellpadding="6">
<td colspan>
<p class="conv" style="margin-top: 10px; margin-bottom: 10px"><b>STANDARD</b></p>
<td colspan>
<p class="conv" style="margin-top: 10px; margin-bottom: 10px"><b>METRIC</b></p>
<p class="conv" style="margin-top: 10px; margin-bottom: 10px">Feet :&nbsp;<input maxLength=1 size=1 value=0 name=F>&nbsp;Inches :&nbsp;<input maxLength=2 size=1 value=0 name=I>
<p class="conv" style="margin-top: 10px; margin-bottom: 10px">&nbsp;=&nbsp;</p>
<p class="conv" style="margin-top: 10px; margin-bottom: 10px"><input maxLength=3 size=1 value=0 name=C disabled>&nbsp;cm.</p>
<td class="conv" colspan="2">
<input type="button" name="Taste" value="Calculate"
onclick="if (rounded.checked == true) {
eval('C.value = ' + this.form.C_exprrnd.value);
eval('K.value = ' + this.form.K_exprrnd.value) }
else {
eval('C.value = ' + this.form.C_expr.value);
eval('K.value = ' + this.form.K_expr.value)
<INPUT type=checkbox name="rounded" value="rounded" checked disabled><font size="1" face="Verdana">Rounded Result</font>
<p class="conv" style="margin-top: 10px; margin-bottom: 10px">

I want the value of

<input maxLength=3 size=1 value=0 name=C disabled>

, this is from hw_calculator.html, to be passed on the

<input type="text" name="weight" value="">

on page1.html. How can I do this?

Huge thanks.

You can use window.opener.document.* to refer any element in the parent window.