In my web application iam using the following javascript code for to set the values in pop up window to main window.
To set the values in list box[PopUp Window]
var frm_bank = document.forms['form1'].elements;
var ind = frm_bank['lst_bankname'].selectedIndex;
var b_code = frm_bank['lst_bankname'].options[ind].value;
var bankname=frm_bank['lst_bankname'].options[ind].text;
and to assign this values to dropdown list[Main Window] the following code is used
window.opener.document.getElementById('ctl00_ContentPlaceHolder1_ddl_bankcode').options[0].value =b_code;
window.opener.document.getElementById('ctl00_ContentPlaceHolder1_ddl_bankcode').options[0].text =bankname;
and the following code is used to call the SelectedIndexChanged event of dropdown list
window.opener.document.getElementById('ctl00_ContentPlaceHolder1_ddl_bankcode').onchange();
It is working fine for first time.after post back it is not worked.if the code
window.opener.document.getElementById('ctl00_ContentPlaceHolder1_ddl_bankcode').onchange();
is not used it works fine all the timew.but i want to work it also.javascript is called and the values bankname,b_code are correct at second time also but it is not set to dropdownlist
What is the problem with it Please help me to solve it