Forum: Ruby on Rails RJS: getting the value of top.location

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2007-02-10 20:48
(Received via mailing list)
In one of my RJS templates I want to get the value of top.location.
page['top.location] and page[:top][:location] don't work...anyone know
how to get that info?

Pat
5a8ab1ea865141adaa35ab9408435003?d=identicon&s=25 Jake Varghese (jake3030)
on 2007-02-10 21:14
Pat Maddox wrote:
> In one of my RJS templates I want to get the value of top.location.
> page['top.location] and page[:top][:location] don't work...anyone know
> how to get that info?
>
> Pat

if top is an ID then try page[:top].location

if top is a JS method then try page << "top.location"

--jake
This topic is locked and can not be replied to.