—I am trying to pass a value from a pop-up to the previous page and I am having some issues…—
[B]ON THE MAIN PAGE:
<a href=”javascript:merge1.popup();”><img src=”_Images/Btn_Search_Green.jpg” border=”0″></a>
<a href=”javascript:merge2.popup();”><img src=”_Images/Btn_Search_Green.jpg” border=”0″></a>
<script language=”Javascript”>
var merge1 = new calendar(document.forms[‘Form1’].elements[‘FacClaSeqA’]);
var merge2 = new calendar(document.forms[‘Form1’].elements[‘FacClaSeqB’]);
var calendars = [];
function calendar(obj_target) {
this.popup = cal_popup1;
this.target = obj_target;
this.id = calendars.length;
calendars[this.id] = this;
}
function cal_popup1 () {
var obj_calwindow = window.open(‘SearchNegotiation.aspx?MergeSearch=Y&Client=SAS’,’Search’,’width=800,height=600,top=10,scrollbars=1,toolbar=0,status=no,resizable=1,menubar=0′);
obj_calwindow.opener = window;
obj_calwindow.focus();
}
</script>
[B]ON THE POP UP WINDOW:
–This page is a form where you search for a specfic claim and when the claim list is displayed you can click on the link below to return back to the main page.–
<script language=”Javascript”>
var re_url = new RegExp(‘datetime=(
var dt_current = (re_url.exec(String(window.location)) ? new Date(new Number(RegExp.$1)) : new Date());
var re_id = new RegExp(‘id=(
var num_id = (re_id.exec(String(window.location)) ? new Number(RegExp.$1) : 0);
var obj_caller = (window.opener ? window.opener.calendars[num_id] : null);
function returnSearch(value) {
window.close();
obj_caller.target.value = (value);
}
</script>
<a href=’javascript:returnSearch(” + sFacClaSeq + “);’>Link</a>
–When I submit the form I lose my initial return to field and when the pop-up window closes it just displays the info in the first text field available instead of the field it’s supposed to.