javascript在回发后无法正常工作

javascript在回发后无法正常工作

本文介绍了javascript在回发后无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Web应用程序iam中,使用以下javascript代码将弹出窗口中的值设置为主窗口.
设置列表框中的值[弹出窗口]

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;


并且以下代码用于调用下拉列表的SelectedIndexChanged事件


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();


不使用它一直都很好w.但是我也想使用它.javascript被调用并且值bankname,b_code在第二次也是正确的,但是它没有设置为dropdownlist
它有什么问题,请帮助我解决它.


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

推荐答案


这篇关于javascript在回发后无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 01:56