js跳转页面回传值问题处理
2013-01-29 17:18
267 查看
母页面中
string url = "../InquiryStores/Maintain.aspx?dt=" + DateTimeUtility.getSystemTime2(null);
string script = "var returnVar =window.showModalDialog(\"" + url + "\", null, \"dialogWidth:800px; dialogHeight:360px;status:no;help:yes\");" +
"if (typeof(returnVar)!= 'undefined') {";
script += "var array=new Array();";
script += "array=returnVar.split('Ω');";
script += "document.getElementById('S_" + sfYAA001To.ClientID + "').value=array[1];";
script += "document.getElementById('S_" + sfYAA001To.ClientID + "').focus();";
script += "}";
executeScript(script);
执行这段js,会弹出窗体画面
子页面中
string returnValue = objects.getData("GUID");
returnValue += "Ω" + objects.getData("YAA001");
returnValue += "Ω" + objects.getData("YAA002");
returnValue += "Ω" + objects.getData("YAA003");
returnValue += "Ω" + objects.getData("YAA009");
returnValue += "Ω" + objects.getData("YAA013");
returnValue += "Ω" + objects.getData("YAA014");
returnValue += "Ω" + objects.getData("YAA016");
returnValue += "Ω" + objects.getData("YAA017");
returnValue += "Ω" + objects.getData("YAA010");
Response.Write("window.close();");
//返回字符串,可以根据Ω来分隔字符串找到自己需要的值
Response.Write("window.returnValue='" + returnValue + "';");
回传returnValue到母页面
string url = "../InquiryStores/Maintain.aspx?dt=" + DateTimeUtility.getSystemTime2(null);
string script = "var returnVar =window.showModalDialog(\"" + url + "\", null, \"dialogWidth:800px; dialogHeight:360px;status:no;help:yes\");" +
"if (typeof(returnVar)!= 'undefined') {";
script += "var array=new Array();";
script += "array=returnVar.split('Ω');";
script += "document.getElementById('S_" + sfYAA001To.ClientID + "').value=array[1];";
script += "document.getElementById('S_" + sfYAA001To.ClientID + "').focus();";
script += "}";
executeScript(script);
执行这段js,会弹出窗体画面
子页面中
string returnValue = objects.getData("GUID");
returnValue += "Ω" + objects.getData("YAA001");
returnValue += "Ω" + objects.getData("YAA002");
returnValue += "Ω" + objects.getData("YAA003");
returnValue += "Ω" + objects.getData("YAA009");
returnValue += "Ω" + objects.getData("YAA013");
returnValue += "Ω" + objects.getData("YAA014");
returnValue += "Ω" + objects.getData("YAA016");
returnValue += "Ω" + objects.getData("YAA017");
returnValue += "Ω" + objects.getData("YAA010");
Response.Write("window.close();");
//返回字符串,可以根据Ω来分隔字符串找到自己需要的值
Response.Write("window.returnValue='" + returnValue + "';");
回传returnValue到母页面
相关文章推荐
- js页面跳转(window.location.href)乱码问题
- js处理页面内部嵌套问题
- ReactJS与antdDesign中页面跳转问题(React Router)
- Shiro中Session过期页面跳转回登录页面处理问题
- js页面跳转的问题(跳转到父页面、最外层页面、本页面)
- jquery mobile页面跳转后js不执行的问题
- action跳转页面css和js失效问题解决
- webview 笔记二(android和js交互、包括链接跳转常见问题处理,加载监视,拦截Url等)
- Shiro中Session过期页面跳转回登录页面处理问题
- jquery mobile开发中页面跳转后js不执行的问题
- struts2中action跳转后页面的css或是js失效的问题
- 问题八-js页面跳转(OK)
- Shiro中Session过期页面跳转回登录页面处理问题
- jquery mobile开发中页面跳转后js不执行的问题
- js页面跳转的问题(跳转到父页面、最外层页面、本页面)
- js页面跳转的问题(跳转到父页面,跳转到最外层页面)
- [导入]解决JS页面跳转ie,firefox,opera不兼容问题
- jquery mobile页面跳转后js不执行的问题
- js页面跳转问题
- 使用SUI mobile 通过a标签跳转到新页面 js文件不加载问题