主页面 <!弹出窗体> <script type=text/javascript > function Pop() { var dept = documentgetElementById(<%= Lab_deptClientID %>)innerText; var result = showModalDialog(SelectProd_noaspx?dept= + dept subpage dialogWidth:px;dialogHeight:px;center:yes;help:no;resizable:no;status:no); //打开模态子窗体并获取返回值 documentgetElementById(txt_prod_no)value = resultsplit()[]; //返回值分别赋值给相关文本框 documentgetElementById(txt_goods_id)value = resultsplit()[]; documentgetElementById(txt_m_id)value = resultsplit()[]; documentgetElementById(txt_batch)value = resultsplit()[]; } </script> <asp:LinkButton ID=lbn_find runat=server Width=>查找</asp:LinkButton> thislbn_findAttributesAdd(onclick Pop()); 弹出页面 <!返回选择的值> <script type=text/javascript > function cc(prod_no cle_mid m_id mk_qty) //参数分别为idname和password { windowreturnValue = prod_no + + cle_mid + + m_id + + mk_qty; //返回值 windowclose(); } </script> protected void GridView_RowDataBound(object sender GridViewRowEventArgs e) { if (eRowRowType == DataControlRowTypeDataRow)//判定当前的行是否属于datarow类型的行 { //返回选择的值 eRowAttributesAdd(OnDblClick cc( + eRowCells[]Text + + eRowCells[]Text + + eRowCells[]Text + + eRowCells[]Text + )); LinkButton lbn_select = (LinkButton)eRowFindControl(lbn_select); lbn_selectAttributesAdd(onclick cc( + eRowCells[]Text + + eRowCells[]Text + + eRowCells[]Text + + eRowCells[]Text + )); } } |