从弹出页面返回值 [英] Returning Values from Pop up page
问题描述
我对javascripting相当陌生...
我正在asp.net中创建一个学生注册页面.
当用户单击编辑注册"时,将打开一个新的弹出窗口(通过javascript),其中包含管理员密码和登录按钮.
单击hte登录按钮时,将验证密码并将管理员状态保存在会话变量中.
我的问题:
我希望弹出窗口将true/false返回到主窗口.因为我要检查以下内容:
Hi there, I am fairly new to javascripting...
I am creating a student registration page in asp.net.
When the user clicks on "Edit registration", a new popup window opens (through javascript) which contains the admin password and a login button.
On clicking hte login button, the password is verified and admin status is saved in a session variable.
My Issue:
I want the popup window to return true/false to the main window. Because i want to check as follows:
if popupwindowresult = true then
if session.item("Admin")= true
go to edit page
else
login error
end if
end if
因此,基本上,我如何从弹出窗口返回true/false?
So basically, how do i return true/false from popup window?
推荐答案
您给弹出窗口提供对主窗口的引用,然后尝试尝试(如果窗口关闭了) )调用主窗口的函数,并向其传递布尔值.
祝你好运!
You give the popup window a reference to the main window and try (in case the window closed) to call a function of the main window passing it the boolean value.
Good luck!
您应该尝试过此 [
u可以在会话中使用popupwindowresult的值.u can take the value of popupwindowresult in session .
这篇关于从弹出页面返回值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!