Click to See Complete Forum and Search --> : window reference


kylemccullough
12-08-2003, 03:32 PM
I cant seem to figure this out... I have page (test.asp) and it has a link to popup a window where the user can click a color. I want the color selected to show up on the main page(test.asp) in a textbox.

If I leave the textbox on the same page, it works, but I cannot figure out how to reference the JavaScript to put it back on the main page... Can this be done??

Heres Code:
function setcolorp(color){
document.forms[0].color.value=color;
return;
}

Heres the HTML to select:
<a href='#' onClick="setcolorp('000000');return true;">

Heres the code to display in textbox:
<input type=text name=color value='' size=10>

Any help would be well appreciated!

fredmv
12-08-2003, 03:35 PM
All you should need is:

opener.document.forms[0].color.value = color;

kylemccullough
12-08-2003, 03:44 PM
yep! Thanks.