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

Passing values from a pop up window to a parent window in an input ?

Status
Not open for further replies.

Daflinn

Programmer
Apr 18, 2001
2
FR
Hy everybody,

after having dramaticaly dammaged my eyes by searchiong for the solution in the forum history, I hope s.o will help me.

As I'm not english ;), I hope i'll be as clear as possible :
In my parent window, I open a pop up window by clicking in a <input type=&quot;text&quot;>.

Within the pop up window, I execute an sql query which gives me a listing of peole. Within that list of people when I click on the name of one of those guys, I want the pop up to be closed and, above all, the <input type=&quot;text&quot;> of my parent window to be filled with the name of the guy I clicked on. This is this last part of the problem for which I cannot find the solution.

Thanx for your very welcomed help
 
Hmmmm, sounds like you need an .asp page to solve this. That's at least how I would do it. I dunno if you know asp or not, but here's what it WOULD look like:

<input type=&quot;text&quot; name=&quot;whatever&quot; value=&quot;<%=FromPreviousInput%>&quot;>

Hope this makes sense. If you want to go this way, you'll only need to through in 3 lines of ASP. It's not hard at all to explain how it works. Let me know.

~Javrix

A broken clock is correct twice per day.

A roomful of monkeys on typwriters will eventually write the great american novel.

If you gave an infinate number of rednecks, an infinate number of shotguns to shoot at an infinate number of stree
 
Well I 've actually just solved my problem without passing through asp. TO answer your question I know asp. But I firstly tried to solve the problem with the asp but the pop up did not closed and my parent window opened within the pop up with the input type filled.

Can U detail a bit more how you'd do with the asp ? I'm rather curious finally.

Thanx, Daflinn

;)
 
Ok, if you know asp I'll skip the basics, but you have page 1. They enter Bob into your Input. You named this input &quot;name&quot;. On the second page, you just dim your variable, and tell your variable to get whatever &quot;name&quot; was on the previous page:

<%
dim variable
variable=Request.Form(&quot;name&quot;)
%>

Now &quot;variable&quot; is actually &quot;Bob&quot;. So now you put the following Input code:

<input type=&quot;text&quot; name=&quot;whatever&quot; value=&quot;<%=variable%>&quot;>

And like magic, the text box by default will have &quot;Bob&quot; in it.

Hope this helped.
~Javrix

A broken clock is correct twice per day.

A roomful of monkeys on typwriters will eventually write the great american novel.

If you gave an infinate number of rednecks, an infinate number of shotguns to shoot at an infinate number of stree
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top