# Lightbox popup on ajax pages

**URL:** <https://www.ruby-forum.com/t/lightbox-popup-on-ajax-pages/163948>\
**Category:** Rails\
**Created:** [March 26, 2009, 12:48pm UTC](https://www.ruby-forum.com/t/lightbox-popup-on-ajax-pages/163948 "2009-03-26T12:48:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeba-momin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/8e7dd6/32.png) [@zeba-momin](https://www.ruby-forum.com/u/zeba-momin)\
**Post date:** [March 26, 2009, 12:48pm UTC](https://www.ruby-forum.com/t/lightbox-popup-on-ajax-pages/163948/1 "2009-03-26T12:48:30Z")

</div>

Hi,  
I’m using lightbox.js for displaying chromeless popup windows.  
I have a main page on which I have javascript\_include\_tag and  
stylesheet\_link\_tag to include lightbox.  
Calls to the lightbox popups from this main page work perfectly…  
But…calls to the lightbox popups from pages which are called by  
ajax(using link\_to\_remote) from the main page do not work… ☹  
They work like simple link\_to’s.  
Even if I write the javascript\_include\_tag and stylesheet\_link\_tag to  
include lightbox again in the ajax pages…it does not work…!!!  
Can someone please tell me how do solve this…  
Thank you…

---

<div class="post-metadata">

**Author:** ![zeba-momin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/8e7dd6/32.png) [@zeba-momin](https://www.ruby-forum.com/u/zeba-momin)\
**Post date:** [March 26, 2009, 12:59pm UTC](https://www.ruby-forum.com/t/lightbox-popup-on-ajax-pages/163948/2 "2009-03-26T12:59:59Z")

</div>

Jeba M. wrote:

> Can someone please tell me how do solve this…  
> Thank you…

Did you Google for [“lightbox.js” ajax]? The first hit’s title is  
“Lightbox JS 2  
hacked for AJAX”…
