开发者

How a Dialog window can modify JS in the parent window

I have a site that opens a dialog. In that dialog I want to be able to modify a JS value in the parent window. The sites are at the same domain.

in the parent I c开发者_如何学编程an do:

currentUserModel.guest(false)

In the dialog, how can I do currentUserModel.guest(false)?

Right now if I try I get:

Uncaught ReferenceError: currentUserModel is not defined

Thanks


opener.currentUserModel.guest(false)

Should work if the "dialog" is a window opened using window.open()
(It's not clear what kind of object your dialog is.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜