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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

returning data to a page from a popup

Status
Not open for further replies.

tsk

Programmer
Apr 5, 2000
2
AU
Hi <br>I am wondering if it is possible to send data collected from one popup page to a parent window. Perhaps some example sites would be helpful if you could point them out ..<br>Thanks<br>
 
I'm pretty sure you can use <FONT FACE=monospace>parent</font>, but I haven't tried anything like that.&nbsp;&nbsp;You could also try giving the parent a name in the body using the <FONT FACE=monospace>id</font> attribute. <p>REH<br><a href=mailto:hawkdogg@crosswinds.net>hawkdogg@crosswinds.net</a><br><a href= by Linux</a><br>Learn Linux and Leave out the Windows :)
 
The information I required was similiar to the information below. Hope it will help others and thanks to Javascripts.internet.com.<br><br>&lt;!-- TWO STEPS TO INSTALL FIELD EXPLANATION:<br><br><br>&nbsp;&nbsp;1.&nbsp;&nbsp;Copy the coding into the HEAD of your HTML document<br>&nbsp;&nbsp;2.&nbsp;&nbsp;Add the last code into the BODY of your HTML document&nbsp;&nbsp;--&gt;<br><br><br>&lt;!-- STEP ONE: Paste this code into the HEAD of your HTML document&nbsp;&nbsp;--&gt;<br><br><br>&lt;HEAD&gt;<br><br><br>&lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt;<br><br><br>&lt;!-- This script and many more are available free online at --&gt;<br>&lt;!-- The JavaScript Source!! <A HREF=" TARGET="_new"> --&gt;<br><br><br>&lt;!-- Begin<br>function explain(name, output, msg) {<br>newwin = window.open('','','top=150,left=150,width=325,height=300');<br>if (!newwin.opener) newwin.opener = self;<br>with (newwin.document)<br>{<br>open();<br>write('&lt;html&gt;');<br>write('&lt;body onLoad=&quot;document.form.box.focus()&quot;&gt;&lt;form name=form&gt;' + msg + '&lt;br&gt;');<br>write('&lt;p&gt;You may enter your ' + name + ' here and it will be copied into the form for you.');<br>write('&lt;p&gt;&lt;center&gt;' + name + ':&nbsp;&nbsp;&lt;input type=text name=box size=10 onKeyUp=' + output + '=this.value&gt;');<br>write('&lt;p&gt;&lt;input type=button value=&quot;Click to close when finished&quot; onClick=window.close()&gt;');<br>write('&lt;/center&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;');<br>close();<br>&nbsp;&nbsp;&nbsp;}<br>}<br>//&nbsp;&nbsp;End --&gt;<br>&lt;/script&gt;<br>&lt;/HEAD&gt;<br><br><br>&lt;!-- STEP TWO: Copy this code into the BODY of your HTML document&nbsp;&nbsp;--&gt;<br><br><br>&lt;BODY&gt;<br><br><br>&lt;center&gt;<br>&lt;form name=form method=post action=&quot;/cgi-bin/your-script.cgi&quot;&gt;<br><br><br>User Name:&nbsp;&nbsp;&lt;input type=text name=&quot;username&quot; size=10&gt;&nbsp;&nbsp;&lt;a href=&quot;javascript:explain('User Name', 'opener.document.form.username.value', 'The user name field is where you select a user name that you will use every time you access this site.&nbsp;&nbsp;Pick something you can easily remember and that will easily identify you.');&quot; onMouseOver=&quot;window.status='Click for explanation...';return true;&quot; onMouseOut=&quot;window.status='';return true;&quot;&gt;Help?&lt;/a&gt;<br><br><br>&lt;br&gt;<br>Password:&nbsp;&nbsp;&lt;input type=text name=&quot;password&quot; size=10&gt;&nbsp;&nbsp;&lt;a href=&quot;javascript:explain('Password', 'opener.document.form.password.value', 'The password field is where you select a unique password for your account.&nbsp;&nbsp;This password will be required each time you login to the site.&nbsp;&nbsp;For security purposes, be sure to pick a password that you can easily remember that contains letters and numbers or symbols but would be hard for others to guess.');&quot; onMouseOver=&quot;window.status='Click for explanation...';return true;&quot; onMouseOut=&quot;window.status='';return true;&quot;&gt;Help?&lt;/a&gt;<br><br><br>&lt;/form&gt;<br>&lt;/center&gt;<br><br><br>&lt;p&gt;&lt;center&gt;<br>&lt;font face=&quot;arial, helvetica&quot; size=&quot;-2&quot;&gt;Free JavaScripts provided&lt;br&gt;<br>by &lt;a href=&quot;<A HREF=" TARGET="_new"> JavaScript Source&lt;/a&gt;&lt;/font&gt;<br>&lt;/center&gt;&lt;p&gt;<br><br><br>&lt;!-- Script Size:&nbsp;&nbsp;2.29 KB --&gt;<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top