Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Help....window.opener problem!!

Thread Tools

Help....window.opener problem!!

JerseyKatt JerseyKatt is offline
Junior Member
Join Date: Jun 2007
Posts: 1
I'm fairly new to javascript.
I have a calling window that has a popup window. The sequence of events should be:
1 - click Add New button on calling window
2 - click on hyperlink which brings up the popup
3 - select a record from popup, which then closes the popup, and sends some data back to calling window.
4 - fill in rest of data on calling window, click Save button

All works fine the first time I add a record. After selecting a record on the popup window the second time, the Save button does not fire, nor do any other actions. I cannot click on any buttons or hyperlinks on the calling page. It just sits there. I can fill in text boxes, but nothing else.

Here is the code from my calling window:

string scr1 = @"<script>
var win1;

function openCustomer(){
win1 = open('../Common/popupCustomerParent.aspx',null,'left=300, top=100, height=600, width= 800, status=no, resizable= no, scrollbars= yes, toolbar= no,location= no, menubar= no');

function updateCustomer(elemValue)
document.getElementById('ctl00_ContentPlaceHolder1 _hidCustomerParentID').innerText=elemValue[0];
document.getElementById('ctl00_ContentPlaceHolder1 _txtCustomerParentName').innerText=elemValue[1];
document.getElementById('ctl00_ContentPlaceHolder1 _hidCompanyName').innerText=elemValue[1];
Sys.WebForms.PageRequestManager.getInstance()._doP ostBack( '" + lnkbtnChooseCustomerParent.ClientID + "', 'updateDropDown' ); win1.close(); window.opener.focus(); " +
"} </script>";

I tried window.opener.location.reload() and that didn't work either. The odd thing is that it did work once with the location.reload and once with the focus, but stopped working in both scenarios.

Can anyone help?? I'm going crazy!
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off