<P>If the <EM>a</EM> variable wolud be a HTML element
like (span, div, input type="text" or input
type="hidden" and many others) you could access it by
the child window. In the child window, just write this
code: window.parent.document.all['oElem'].innerText
"What you want..." and that's ok! (oElem is the id for
a div element existing on the parent window).
<P> <B><I>Dima <difrad76@y...></I></B>
wrote:
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT:
5px; BORDER-LEFT: #1010ff 2px solid">Hello <BR><BR>I
am trying to spawn a window than read a data froma
textbox on that window and send it <BR>back to the
parent window. Well I feel a little bit stupid this is
simple staff. Anyways here is
<BR>scripts.<BR><BR>Parent Window:<BR><BR><BR><BR>
<SCRIPT><br>var a;<br>function
new_window()<br>{<br><br>
<br>newWindow=window.open("test.html","myWindow","width=350,height=150,status");<br>
newWindow.focus();<br> return false;<br>}<br>function
showVar()<br>{<br> alert ("The value is "+a);<br>
return false;<br>}<br></SCRIPT>
<BR><BR><BR><A onclick="return new_window()"
href="http://us.f149.mail.yahoo.com/ym/nowhere">click
here to spawn a new <BR>window</A><BR><BR><A
onclick="return showVar()"
href="http://us.f149.mail.yahoo.com/ym/nowhere">click
this to see the Variable</A><BR><BR><BR><BR>Child
Window: <BR><BR><BR>
<SCRIPT><br>window.status="Enter info into the text
box";<br>function
cmdBtn_onclick()<br>{<br><br>window.parent.a=document.form1.txtBox.value;<br><br>alert(parent.a);<b
r>window.close();<br><br>}<br></SCRIPT>
<BR><BR><BR>
<FORM name=form1><BR><INPUT name=txtBox><BR><BR><INPUT
type=button value="Press Me" name=cmdBtn
<br>onclick="cmdBtn_onclick()"><BR></FORM><BR><BR><BR><BR>Your
help is appreciated.<BR>---<BR>Change your mail
options at http://p2p.wrox.com/manager.asp or <BR>to
unsubscribe send a blank email to $subst('Email.Unsub').</BLOCKQUOTE>
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com