Ok, I am fairly new to .js and I need some help. Here is my situation.
Objective: To copy select text (text box) from child window to parent window (text box).
Setup: The parent window has several input fields and the child window has only one input field. I am opening/filtering the child window from the parent when I need to select an option for that input field.
Problem: I can make it work with one input field but I need to have different input fields and I want to use the same child window. The selction I make always go to input field1.
Below is the script I have so far.
<script langauge=”javascript”>
function post_value(){
if(document.form1.FieldID.value = 1){
opener.document.form1.Field1.value = document.form1.c_FieldID.value;
}
else if(document.form1.FieldID.value = 2){
opener.document.form1.Field2.value = document.form1.c_FieldID.value;
}
else {return false;
}
self.close();
}
</script>
Hope this makes sense to someone and you can guide me in the right direction.
Thanks,
Shawn