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

pop up window, check values, insert checked values into item field

Status
Not open for further replies.

ShamanFR

Programmer
Sep 20, 2005
9
FR
I have a form that uploads items to the db and I have a selection of colors. Now what I want to do I have a button on the form called colors and then have a pop up window open when click. On the pop up window there will be a list of colors with the color thumbnail and a check box. I want to be able to select the colors on the pop up window and when I hit add colors, I would like the colors to be added to the text feild on the form.

The best example that I can think of to demonstrate this is the email address book on yahoo. You open the address book in a pop up window, select the address and when you hit insert address's it inserts them into the TO: field. I want my colors to do the exact same thing, to get added to the color field the same way, sperated by commas.

I would search google but I have not clue what to search under. Your help will be greatly appreciated.


Nick
 
That is not really what I am looking for. I am more looking for a window where I add the colors and select them with a checkbox. Then all the checked colors get added to a text field in the parent window. The reason I am asking for Java is because PHP is server side and will not display the choosen colors right away.

Here is another way I could do it. How could I get the info submited in a form posted on the parent windo. lets say I check all the checkbox's then i hit add, and after I hit add it puts all my checked colors into on variable and that variable is sent with javascript to the parent window and set into the text field. How would I take that variable and add it to the parent window?

I am not a JavaScripter so if you guys could help me out with this, I could do the rest of the PHP.

Thanks,

Nick
 
ok...i understand now what you want to do :)

you use the window.opener method to access the window that opened the popup.

let's say your form's name is upload_form, and the field of the colors is called color_list you will access it like this:

Code:
window.opener.upload_form.color_list.value='';


read this article, it might help:
(-:
 
sweet that is the closest thing that I have seen to what I need yet. Now how can I get all the cehcked variables from the child window into the value part of the window.opener script?

I will read up some more on this, but if I can get an example that would be great.

Thanks,

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top