Results 1 to 3 of 3

Thread: Dynamic Ajax Content & LightboxJS

  1. #1
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Dynamic Ajax Content & LightboxJS

    EDIT: Sorry, just found http://www.dynamicdrive.com/forums/a...p/t-11098.html that describes the same issue..


    Dynamic Ajax Content
    http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    I have some problem with using the Dynamic Ajax Content when trying to load a gallery made which is using Lightbox.

    My problem is that when I load the gallerypage, lightbox needs the following .js files loaded:
    HTML Code:
    <script type="text/javascript" src="js/prototype.js"></script>
    <script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="js/lightbox.js"></script>
    and this is done by using
    HTML Code:
    <a href="javascript:ajaxpage('gallery/england2005/default.html', 'mainCont'); loadobjs('css/lightbox.css', 'css/thumbs.css', 'js/prototype.js', 'js/scriptaculous.js?load=effects', 'js/lightbox.js')" class="content">"
    Now I have pinned down the problem to the loading of
    Code:
    'js/scriptaculous.js?load=effects'
    if this line is removed, the page loads but lightbox doesn't work. Can the Dynamic Ajax Content be modified to support a .js that loads another js?

    The page can be found on www.tobiaslolax.nu (gallery link), if you need a look on the sourcecode you will need to use the url www.dirtyworkers.org/tobiaslolax.nu/

    Thanks in advance,
    Tobias
    Last edited by peep; 01-20-2007 at 11:02 AM.

  2. #2
    Join Date
    Jan 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I had the same problem, solved like this:

    Code:
    <a href="images/content/image-1.jpg" rel="lightbox" onmousedown="initLightbox()">some link</a>
    This line is the link from a page that loads into Dynamic Ajax Content. So just add this to your link onmousedown="initLightbox()"

    The page where is used this is: www.concretsolution.ro

  3. #3
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for sharing, but I really had to use that timeout-fix that was talked about in the other thread because I was integrating a gallery made with some freeware and I couldn't go and change the html code that got generated (anf francly, I couldn't start adding the onmousedown() to all the images in my gallery..

    The gallery can be found on www.tobiaslolax.nu (and don't laugh at my code)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •