First of all... this is Javascript, not Java. Even though the names are similar, they are two completely different things.
Let's say you have an input field that requests background color. You name it "bgcolor" with the name="bgcolor" attribute. Let's also say that your form is named "myform."
If you wanted to change the value of that field to "#FFFFFF" using Javascript, you use:
window.document.myform.bgcolor.value="#FFFFFF"
The problem is... you need to accept input from another window. the above code will try to access the field from the popup window, and of course that wouldn't work.
What would really help is if the original window (with the form) could be accessed by the popup window. The good news is, it can. simply use the opener object, and you're good to go.
A link on your popup window that chooses blue, for example, might say:
<a href="#" onclick="sendColor('#0000FF')">#0000FF</a>
The sendColor() javascript function would simply be:
function sendColor(color) {
opener.document.myform.bgcolor.value = color;
window.close();
}
This was all done right now off the top of my head, so if there is anything in there that isn't exactly right, I apologize. If you need much more Javascript help, I suggest you go to a Javascript forum or buy a good book.
Good Luck!