# Ajax tabs in lightbox

**URL:** <https://www.ruby-forum.com/t/ajax-tabs-in-lightbox/181265>\
**Category:** Rails\
**Created:** [January 8, 2010, 2:38pm UTC](https://www.ruby-forum.com/t/ajax-tabs-in-lightbox/181265 "2010-01-08T14:38:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ab992/32.png) [@jeb](https://www.ruby-forum.com/u/jeb)\
**Post date:** [January 8, 2010, 2:38pm UTC](https://www.ruby-forum.com/t/ajax-tabs-in-lightbox/181265/1 "2010-01-08T14:38:00Z")

</div>

I try to put some tabs in a ligtbox (lightview) to do a user friendly  
form, kind of. With lightbox i mean a modal window.

The tabs (livipipe) works well withe ajax in the normal window, but  
when I put them in the ligtview ligtbox they stop working. I guess it  
has something to do with getelementbyid in the DOM and seems very  
complicated.

Anyhow, does anyone have any experience of doing ajax tabs in a  
lightbox that works?

---

<div class="post-metadata">

**Author:** ![jeb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ab992/32.png) [@jeb](https://www.ruby-forum.com/u/jeb)\
**Post date:** [January 10, 2010, 1:03am UTC](https://www.ruby-forum.com/t/ajax-tabs-in-lightbox/181265/2 "2010-01-10T01:03:54Z")

</div>

On Jan 8, 8:36Â am, jeb [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I try to put some tabs in a ligtbox (lightview) to do a user friendly  
> form, kind of. With lightbox i mean a modal window.
> 
> The tabs (livipipe) works well withe ajax in the normal window, but  
> when I put them in the ligtview ligtbox they stop working. I guess it  
> has something to do with getelementbyid in the Â DOM and seems very  
> complicated.
> 
> Anyhow, does anyone have any experience of doing ajax tabs in a  
> lightbox that works?

The thing I’ve run into with lightboxes is that they typically _don’t_  
generate another document.ready-style event, so a lot of unobtrusive  
JS methods can get confused. Can you post more details about how  
you’re attempting to add the tab behavior and what exactly “isn’t  
working”?

–Matt J.

---

<div class="post-metadata">

**Author:** ![jeb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ab992/32.png) [@jeb](https://www.ruby-forum.com/u/jeb)\
**Post date:** [January 10, 2010, 1:10am UTC](https://www.ruby-forum.com/t/ajax-tabs-in-lightbox/181265/3 "2010-01-10T01:10:27Z")

</div>

jeb wrote:

> I try to put some tabs in a ligtbox (lightview) to do a user friendly  
> form, kind of. With lightbox i mean a modal window.
> 
> The tabs (livipipe) works well withe ajax in the normal window, but  
> when I put them in the ligtview ligtbox they stop working. I guess it  
> has something to do with getelementbyid in the DOM and seems very  
> complicated.
> 
> Anyhow, does anyone have any experience of doing ajax tabs in a  
> lightbox that works?

This has nothing to do with Rails. It’s a JavaScript issue, so you’ll  
probably get better answers on a JavaScript forum.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![jeb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ab992/32.png) [@jeb](https://www.ruby-forum.com/u/jeb)\
**Post date:** [January 10, 2010, 12:02pm UTC](https://www.ruby-forum.com/t/ajax-tabs-in-lightbox/181265/4 "2010-01-10T12:02:47Z")

</div>

Figured it out at last.
