How can i make buttons Enabled & Gridview with binded data only when i select a value from POPUP and click on OK
I am having a form with search button when i click on that i will have a pop-up opened with some list of EmpID and when i click on ok i will prompt the user the selected one. When the user clicks on ok on that then only i would like to enable the buttons on the form and also i would like to show the gridview with binded data selected on particular ID Ma Java script
<script language="javascript" type="text/javascript">
function GetData(Name)
{
var Hiddval=document.getElementById("ctl00_ContentPlaceHolder1_HiddenField1").value;
document.getElementById("ctl00_ContentPlaceHolder1_txtEmpSearch").value=Name;
alert(Hiddval);
return false;
}
My code for button click is as follows
protected void btnSearch_Click(object sender, EventArgs e)
{
Response.Write("<script>window.open('cliEditEmployee.aspx',null,'height=300px,width=390px,status=yes,toolbar=no,menubar=no,location=no');</script>");
BtnEmployeeData.Enabled = true;
btnEmplo开发者_如何转开发yeePersonlData.Enabled = true;
btnSalaryinfo.Visible = true;
btnW4Form.Enabled = true;
btnBankdata.Enabled = true;
}
So can any one give me an better idea to implement this
looks like you are enabling the buttons right after window.open, no matter what they did in the new window; perhaps you should do that upon clicking the OK from the child window, you can use the window.opener to have access to the parent DOM
精彩评论