服务器端dialogArguments和模态对话框 [英] Server-side dialogArguments and modal dialog

查看:72
本文介绍了服务器端dialogArguments和模态对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello all



我已经在这个问题上搜索了很多,现在我真的需要一个解决方案:\。让我总结一下我的情况:



1.有一个标签,可以使用javascript中的showModalDialog打开一个模态对话框,这个模态对话框包含一个用户控件。我需要刷新打开模态对话框的父页面。弹出窗口仅将一些数据保存到数据库中,父页面显示这些数据。



2.正如您在1中看到的那样,父级和父级之间没有数据传输模态对话框,所以这里的另一种情况是关闭后将数据从弹出窗口传回父页面并刷新它。



正如你所看到的我的操作是服务器端操作,我得出结论,dialogArguments一旦进入服务器端就变得未定义!您可以分配值并将其作为参数传递给showmodeldialog,但是一旦它是服务器端,它就是未定义的。在客户端完全正常工作:\

解决方案

你根本不应该使用它。

它是客户端操作,而不是服务器端,因此在您完成服务器并将页面发送到用户之前,它甚至不会呈现给用户!因此服务器端无法使用用户可能想要发送的任何结果!



不仅如此,它已被折旧多年,而且它即将到来从Chrome中完全删除! https://code.google.com/p/chromium/issues/detail?id=345831 [ ^ ]

Hello all

I have searched in this problem a lot, and now I really need a solution :\ . Let me summarize my situation:

1. There is an tag that opens a modal dialog using showModalDialog from javascript, this modal dialog contains a user control. I need to refresh the parent page that opened the modal dialog. The popup saves some data into the database only and the parent page displays these data.

2. As you see in 1 there is no data transferred between the parent and the modal dialog, so here is another case is to transfer data from the pop-up back to the parent page after closing it and refresh it also.

As you can see my operations are server-side operations, I've concluded that the dialogArguments once got into server-side it becomes undefined!. You can assign values and pass it as arguments to the showmodeldialog but once it's server-side it's undefined. On client-side is fully working :\

解决方案

You should not be using it at all.
It is a Client side operation, not Server side, so it is not even presented to the user until you have finished on the server and sent the page there! So the server side can't use any results the user might want to send it!

Not only that, it's been depreciated for years, and it is just about to be removed completely from Chrome! https://code.google.com/p/chromium/issues/detail?id=345831[^]


这篇关于服务器端dialogArguments和模态对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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