使用javascript将值从一个内容页面返回到另一个内容页面 [英] Return values from one content page to another content page using javascript
本文介绍了使用javascript将值从一个内容页面返回到另一个内容页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用以下函数将值从当前页面返回到另一个页面。如果我使用两个没有母版页的简单页面,这样可以正常工作。但是当我使用带有母版页的内容页面时,它不会返回值。我得到的值是 undefined
。
function SelectAndClose(){
txtValue = document.getElementById(< span class =code-string>' _ browseTextBox');
// txtValue = document.getElementById('_ browseTextBox');
window.returnValue = txtValue。 value ;
window.close();
return false ;
}
i我正在使用
function showDirectory() {
document.all.TextBox1。 value = window.showModalDialog( browseDirectory.aspx,' jain', dialogHeight:560px; dialogWidth:360px; edge:Raised; center:Yes; help:Yes; resizable:Yes; status:No; 跨度>);
}
来收集页面返回的值
为什么会这样?我如何获得正确的值?帮帮我..
解决方案
参考:从中调用JavaScript ASP.NET母版页和内容页 [ ^
i m using the following function to return value from current page to another page.this works fine if i use both simple pages without master page.But when i use content pages with master pages its not returning value.the value that i get is "undefined
".
function SelectAndClose() {
txtValue = document.getElementById('_browseTextBox');
//txtValue = document.getElementById('_browseTextBox');
window.returnValue = txtValue.value;
window.close();
return false;
}
i am using
function showDirectory() {
document.all.TextBox1.value = window.showModalDialog("browseDirectory.aspx", 'jain', "dialogHeight: 560px; dialogWidth: 360px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: No;");
}
to collect values returned by page
Why so?How can i get proper values? Help Me..
解决方案
Refer: Calling JavaScript from ASP.NET Master Page and Content Pages[^]
这篇关于使用javascript将值从一个内容页面返回到另一个内容页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文