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.)
精彩评论