Skip to main content
gamedev.net
🔒 Locked

[web] CAlling a javascript function in another frame

Started by lincsimp 2 replies 8.2k views
Original Post
lincsimp
lincsimp
Hi How can I do this? I know parent.frames["name] lets me access the other frame, but how can I call a function in it?
Kalasjniekof
Kalasjniekof
Because of security reasons, I would be surprised if this could be done.
markr
markr
&#106avascript functions are normally properties of the "window" object. So you can just acll them as a method of the other frame's window object.<br><br>However, some security restrictions apply - I believe that the two frames have to be from the same site.<br><br>Mark
lincsimp
lincsimp
I found:

parent.frames['mainFrame'].FunctionName(args);

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.