弹出窗口中的javascript调用主Web表单中的某些功能 [英] javascript in popup calling some function in main web form

查看:52
本文介绍了弹出窗口中的javascript调用主Web表单中的某些功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个添加表单,其中包含一个打开弹出窗口的链接。主要的

添加表单有一个下拉菜单,其中包含从数据库填充的项目。在

弹出窗口中,您可以向数据库中添加其他项目,所以当您这样做时,我想要做的就是以某种方式刷新主屏幕显示

更新,但同时保留

用户已输入的页面中的任何数据。有没有人找到这些类型的解决方案

的情况?谢谢。

I''ve got an add form with a link that opens a pop up window. The main
add form has a drop down menu with items populated from a db. In the
popup window, you can add additional items to the db, so when you do,
what I''d like to do is somehow refresh the main screen to show the
updates, but at the same time, keeping any data in the page that the
user has already entered. Has anyone found a solution for these types
of situations? Thanks.

推荐答案




如果主页面有JavaScript方法" methodname"声明,您可以随时使用以下方法从弹出窗口中调用它:


window.opener.methodname(<可能的参数>);


此方法可能会导致回发或重新加载或主页上的任何内容。


-

Teemu Keiski
MCP,Microsoft MVP(ASP.NET),AspInsiders成员

ASP.NET论坛版主,AspAlliance专栏作家
http://blogs.aspadvice.com/joteke

" geoff" < CA ******** @ hotmail.com>在消息中写道

news:bf ************************** @ posting.google.c om ...

我有一个添加表单,其中包含一个打开弹出窗口的链接。主要的

添加表单有一个下拉菜单,其中包含从数据库填充的项目。在

弹出窗口中,您可以向数据库中添加其他项目,所以当您这样做时,我想要做的就是以某种方式刷新主屏幕显示

更新,但同时保留

用户已输入的页面中的任何数据。有没有人找到这些类型的解决方案

的情况?谢谢。
Hi,

if the main page has JavaScript method "methodname" declared, you can always
call it from the popup by using:

window.opener.methodname(<possible arguments>);

This method could cause a postback or reload or whatever at the main page.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"geoff" <ca********@hotmail.com> wrote in message
news:bf**************************@posting.google.c om...
I''ve got an add form with a link that opens a pop up window. The main
add form has a drop down menu with items populated from a db. In the
popup window, you can add additional items to the db, so when you do,
what I''d like to do is somehow refresh the main screen to show the
updates, but at the same time, keeping any data in the page that the
user has already entered. Has anyone found a solution for these types
of situations? Thanks.





如果主页面有JavaScript方法" methodname"声明,您可以随时使用以下方法从弹出窗口中调用它:


window.opener.methodname(<可能的参数>);


此方法可能会导致回发或重新加载或主页上的任何内容。


-

Teemu Keiski
MCP,Microsoft MVP(ASP.NET),AspInsiders成员

ASP.NET论坛版主,AspAlliance专栏作家
http://blogs.aspadvice.com/joteke

" geoff" < CA ******** @ hotmail.com>在消息中写道

news:bf ************************** @ posting.google.c om ...

我有一个添加表单,其中包含一个打开弹出窗口的链接。主要的

添加表单有一个下拉菜单,其中包含从数据库填充的项目。在

弹出窗口中,您可以向数据库中添加其他项目,所以当您这样做时,我想要做的就是以某种方式刷新主屏幕显示

更新,但同时保留

用户已输入的页面中的任何数据。有没有人找到这些类型的解决方案

的情况?谢谢。
Hi,

if the main page has JavaScript method "methodname" declared, you can always
call it from the popup by using:

window.opener.methodname(<possible arguments>);

This method could cause a postback or reload or whatever at the main page.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"geoff" <ca********@hotmail.com> wrote in message
news:bf**************************@posting.google.c om...
I''ve got an add form with a link that opens a pop up window. The main
add form has a drop down menu with items populated from a db. In the
popup window, you can add additional items to the db, so when you do,
what I''d like to do is somehow refresh the main screen to show the
updates, but at the same time, keeping any data in the page that the
user has already entered. Has anyone found a solution for these types
of situations? Thanks.


对不起,我想我应该澄清一下。我意识到我可以在主页面中调用一个

javascript函数...我最大的障碍是

如何才能让javascript做回发?


***通过开发人员指南 http://www.developersdex发送。 com ***

不要只是参加USENET ......获得奖励!
Sorry, guess I should have clarified. I realize that I can call a
javascript function that way in the main page... my biggest hurdle is
how can I get javascript to do a postback?

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


这篇关于弹出窗口中的javascript调用主Web表单中的某些功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆