“top.myframe has no properties” (myframe is the name of my iframe)
I must admit i don’t even know how to take this value and do something
with it in rails, so at the minute to test it i’m just doing an alert
box with the returned string. But it seems to be failing while
accessing the myframe object.
if the ‘add this page’ button is in the iframe, i believe you can use
top.methods etc … if the button is in the main page, and you want to
access the iframe object, you can use:
document.frames.myframe # this returns the iframe object
i believe you’ll need to adjust the syntax around a little bit for
browser compatibility - ie, firefox, safari, and others use slightly
different syntaxes, but they all are similar, give or take … you might
syntax differences may be one of the problems (if you see there are
differences per browser).