pass field to child window

Q

quickcur

Hi, I am writing a javascript function. The idea is this very similar
to the "color picker":

1. You have a html page where you have many text fields. Suppose each
of them is a child's name. Besides each of the text fields you have a
button.
2. If you click the button, my javascript function will open a new
browser window. In that window, I will show other names that are very
similar to this one.
3. If user selects a new name in this new window, my javascript
function will close the new window and put the new name in the text
field in the old window. Thus, the new window has to have a reference
to the text field.

I now have no problem to open the new window and display list of names.
My problem is how to pass the reference of the text field to the new
window. Since I have many many text fields and all of them use the same
function, I can not hard-code the text-field in the javascript
function.

Please help.

qq
 
T

Tim Williams

I now have no problem to open the new window and display list of names.
My problem is how to pass the reference of the text field to the new
window. Since I have many many text fields and all of them use the same
function, I can not hard-code the text-field in the javascript
function.

What function ? If you post your existing code, you're more likely to get helpful suggestions as to how to improve it...

Tim
 
G

goulart

var win = window.open("etc");
win.text = "my new color etc etc"


then inside the new window:


window.onload = function () {
alert (window.text);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top