使用 Google Closure 库的 Ajax 窗口(弹出)
是否有任何类(如goog.ui.dialog
)让我显示一个对话框,其内容可以通过ajax从另一个文件中获取?
- goog.ui.Dialog 是实现此目标的合适类吗?
- 我应该通过其他基本类(例如
good.net.XHR
和goog.ui.Popup
)来实现它吗?
Is there any class (like goog.ui.dialog
) that let me show a dialog which its content can be fetched by ajax from another file?
- Is goog.ui.Dialog an appropriate class for this goal?
- Shall I implement it by other fundamental classes such as
good.net.XHR
andgoog.ui.Popup
?
您可以扩展 goog.ui.dialog 并获取内容。
一个可以帮助您的简单示例:
使用 json 中的响应来构建 ui.Dialog,如下所示:
这个示例不能直接工作:/
You can extends the goog.ui.dialog and fetch the content.
A simple example wich can help you:
That's use a response in json to build the ui.Dialog like this:
This example can don't work directly :/