Tabbed javascript widget for a Rails app
Posted
by neilc
on Stack Overflow
See other posts from Stack Overflow
or by neilc
Published on 2010-05-10T06:22:10Z
Indexed on
2010/05/25
17:51 UTC
Read the original article
Hit count: 286
A user registers on our Rails app and they're given javascript to embed a widget in their website. The widget has a tabbed interface, like the JQuery tabs http://stilbuero.de/jquery/tabs_3/. iFrames have been tested, but the widget form factor and cross-domain policy negates the use of iframes. The widget is very dynamic and will often update the DOM with new content - and because of cross-domain policy, it looks as though JSONP is necessary.
I understand that 'widget.js.erb' needs to create the widget layout, reference a stylesheet, render the tabs, etc - but once a tab is clicked, how does the widget request the content from the Rails app and render it in the DOM?
© Stack Overflow or respective owner