Lightbox JS v2.0 Mar 29, 2006

Lightbox JS v2.0 – Go check it out!

Use the comments on this entry to post and discuss bugs, questions, and troubleshoot the script. I’ll be in and out of here.

3/31/06: I’ve Released a minor update v2.01 that fixes IE6 centering and smooths out the kinks in the resize transition. If you’re looking for multi-line captions or keyboard navigation, expect another minor update this weekend.

4/4/06: New update v2.02 that keeps the layout in check when captions extend to multiple lines. Keyboard navigation has also been enabled. Lastly, the addition of a variable in the lightbox.js configuration section to control the speed of the resize transitions.

910 Comments
  1. Naina Mar 27th, 2006

    I’ve just started using LightBox on my blog – and now you have an upgrade! Whoa!

    Thanks Lokesh – browsing the internet has been quite useful for me in terms of learning about the possibilities. Thank you for sharing.

  2. oneiros Mar 27th, 2006

    /is excited

  3. macx Mar 27th, 2006

    What’s new on Lighbox 2.0?

  4. codecraig Mar 27th, 2006

    Lokesh! thanks much…can’t wait for it….well I guess I can…i’ve been waiting for some time already…but thanks for pulling through!

  5. T aka! Mar 27th, 2006

    And? almost finished? Can’t wait! :-)

  6. Rich Mar 27th, 2006

    making whats already great even better!
    Lokesh is my hero.

  7. Colin Cameron Mar 27th, 2006

    Very exciting! My money is on the slideshow feature we have been hearing about.

  8. Kevin Mar 27th, 2006

    woot woot! I will be checking back often, very excited!

  9. Jesús Acuña Mar 27th, 2006

    Wow I cant wait for it :)

  10. Jason Levine Mar 27th, 2006

    Looking forward to it. I’ve already used Lightbox on my wife’s website for her class, a freelance project I’m working on, and a redesign of a website of mine (using WordPress). I can’t wait for 2.0.

    Here’s hoping that the slideshow feature makes it in. That’s the #1 request my wife has given me. She wants to hit “back/forward” links to browse the photos instead of escaping and clicking the next photo. I must admit, I’d like that too. :-)

  11. Jim Connolly Mar 27th, 2006

    You need to slow down, you’re making the rest of us look bad.

  12. Sunil Mar 28th, 2006

    the demos are amazing! I was about to install Lightbox JS after discovering your site a couple of days ago. after seeing the demo, i’m going straight to v2.0

  13. Jack Black Mar 28th, 2006

    #11: On the contrary, you need to speed up.

  14. James Mar 28th, 2006

    Oh my God…

  15. oneiros Mar 28th, 2006

    James wrote: “Oh my God…”

    You took the words right out of my mouth. Stunning!

  16. Emmanuel Okorie Mar 28th, 2006

    Totally gobsmacked….

  17. stabani Mar 28th, 2006

    definetly stunning.. waiting for it anxiously indeed.

  18. Kevin Mar 28th, 2006

    Just saw the demos! Amazing work! You set the original bar which other people imitate and improve on, then you come out with this and set the bar even higher! Great work! Cant wait to use it.

  19. Judy Mar 28th, 2006

    Lokesh, you rock! I am filled with anticipation, and hope you have the bandwidth to cope with the flood of traffic when you release it.

  20. Koka Mar 28th, 2006

    lightbox roqs. the demos are great.

  21. Jeremy Mar 28th, 2006

    Beautiful.

  22. Big Dave Mar 28th, 2006

    WOW, This is awesome! Thanks for setting the bar even higher!

  23. Enzo Santagata Mar 28th, 2006

    I thought Lightbox is exciting and could never be one better. Then Lightbox 2.0! Great
    Waiting for the release

  24. Anonymous Coward Mar 28th, 2006

    This is *very* exciting. Thanks for all you do and letting us humble script kitties use your brilliant work!!!!

  25. fens Mar 28th, 2006

    http://www.lokeshdhakar.com/projects/lightbox2/ seems to be the new page for v2 :P course it might not be since its more a holding page

  26. Serge Mar 28th, 2006

    The preview does not seem to work in Firefox 1.5 for Windows. Has anyone else had this problem? Works fine in IE.

  27. Jason Levine Mar 28th, 2006

    Works fine for me in FF 1.5 and IE 6.

    Oh, and the demos are even cooler than I imagined they’d be. I can’t wait to get my hands on this and add it into my websites. (My wife is sure to be very happy with the change.)

  28. Dan Mar 28th, 2006

    as Serge said, it too isnt working, in Firefox 2.01a and IE7, IE6. Only one that works is tke keys image rest just load image plain and simple.

  29. Lokesh Mar 28th, 2006

    #28 Dan – I haven’t tested in IE7 or FF2.01a yet, though it worked fine in my tests in IE6. I will look into this in the evening. Thanks for the note.

  30. AsceticMonk Mar 28th, 2006

    When I first saw Lightbox, I was truly ecstatic and quickly implemented into my blog, and I thought it is perfect. But when I saw the demo today, I was blown away. Man, it is so cool, so smooth and at the same time intuitive. I am anxiously waiting for its release, and thank you so much for your devotion on this project!

  31. ian Mar 28th, 2006

    I like the improvements

  32. Caius Durling Mar 28th, 2006

    http://www.lokeshdhakar.com/js/lightbox.js

  33. Renduvall Mar 28th, 2006

    You are to be commended. This is absolutely amazing! I was in the middle of trying to find a gallery script for my client last week when I found your lightbox. The *only* thing I could have wished for is the ability to move between photos. I have put off my client for the last couple of days when I saw your update hoping to install your new script, which I’m sure will blow him away. I am sitting by my computer waiting….

    Side note: It does not work for me for Firefox v1.5 either. It just linked directly to the photos. But, amazingly, didn’t have a problem in Netscape 7.2, IE 6.0 or Opera 8. Any ideas why??

  34. Renduvall Mar 28th, 2006

    My apologies, Lokesh. I spoke too soon. The Web Developer bar in Firefox had ‘disable Java’ (but not JavaScript) and ‘disable minimum font size’. One of those must have messed with it, because its now working in Firefox 1.5 for me.
    -Sorry.

  35. Magnus Mar 28th, 2006

    Awesome. I’m going to be using a modified lightbox for my wordpress blog. Thanks for making such a useful script!

  36. Kavita Mar 28th, 2006

    Its cool……. Like the improvements…

    Keep it up…

    http://www.ajaximpact.com

  37. Colin Cameron Mar 28th, 2006

    Just in time for reboot! I cant wait to play around with this.

    The fade effect is neat but where is the picture? Safari just shows the overlay.

  38. zOlive Mar 29th, 2006

    Very nice new features… However, maybe you should make the images appear quicker in the slideshow (don’t wait for their frame to have finished its resizing… maybe trying to fade-in a ratio-preserved image inside the frame, as soon as it has successfully been loaded).
    Kudos and thanks for all your work !

  39. Colin Cameron Mar 29th, 2006

    OK, it works for me now.. Its glorious!

  40. Patric Mar 29th, 2006

    Hey.

    This is awsome. I have been looking for a gallery script for some time now, but can’t really find anything that meets my needs of intergratability and some other stuff, this does…as long as i don’t have too many pic’s to show, hehe…It takes some fiddeling to manage many pic’s, but once started and having to add a minor number of photos…Well, it rocks. I can’t wait for the next verision either…One thought tho…Is it possible to speed it up some, I’m currently on 2Mb hook up and it’s kind of “naggy”…

    This works in both IE and FF for me, btw. FF ver 1.0.6 is good.

    Regards – Patric.

  41. Acha Ladka Mar 29th, 2006

    Side note: It does not work for me for Firefox v1.5 either. It just linked directly to the photos. But, amazingly, didn’t have a problem in Netscape 7.2, IE 6.0 or Opera 8. Any ideas why??

    I dunno if that really is a bug but , if the file size of the document in which the lightbox is included / used is huge :” heavy or wat ever [initLightbox()] is invoked only on [window.onload] so this might result in unexpected direct linking to the images , so it wud be better we invoke the function immediately after your links/gallery.

    Great work Lokesh , Mujhe Khoob maja aaya iss script ko dekhke , great work man .. and a small dbt :D are u using Prototype for this if yes its too heavy , hope u wud this liteweight http://moofx.mad4milk.net/#methods its a small library and its good .. and the array idea was around my brain and u finished implementing it even b4 i cud get some time :X

    Regard
    Ek Acha Ladka

  42. Acha Ladka Mar 29th, 2006

    Oops how cud i forget this …. loads of kisses and hugs to all you girls who ever posted here and made lokesh happy , candies and roses xtra for every girl whos smiling right now .. beers for us .

    I mistyped my email lol

  43. blackshtef Mar 29th, 2006

    Hi there!
    I really like the script, and I attend to use it on my website, which is comming soon, you’ll be noticed and credited as well ;)

    cya

  44. codecraig Mar 29th, 2006

    Digg it!

  45. Dan Mar 29th, 2006

    Lokesh just tested it in IE7 and Firefox 2.0a1 and works a treat very nice work!

  46. Taka! Mar 29th, 2006

    Thanks Lokesh!
    I have been checking back every hour or so in the past couple of days, now I’ve got it up and running and it works like a charm. Thanks a lot!

  47. Anonymous Mar 29th, 2006

    Thanks again, I am currently incorporating it on my website.

    With all this traffic for V2 it will be a good test of DreamHost, let us know if you have any problems.

    Kevin

  48. NOGG3R5 Mar 29th, 2006

    Lokesh, how do you do it? Everytime you pull togethera new version f lightbox its great! V1 was good, the initial updates made it better, and now version two is stunning! its easily the most gorgeous image “thing” in the world yet!

  49. Kean Tat Mar 29th, 2006

    Thanks Lokesh,

    I love the way you did it! so COOL and nicely done…
    Great JOB! Always keep up the good work! Many Thanks.

    KeanTat

  50. Anonymous Mar 29th, 2006

    Excellent job, thanks much

  51. Jason Levine Mar 29th, 2006

    It looks very nice. Unfortunately, I think I’ve turned up a potential bug. I was trying to integrate it into my wife’s site but it kept messing up. The photo pop-up would appear only way down on the page, and wasn’t styled.

    After some debugging, I figured out that the stylesheet wasn’t being loaded up. I took the original, unzipped download and tried altering it bit by bit until I found the cause. For some reason, the script doesn’t like the CSS file being in a “Stylesheets” folder. It’s ok with “css”, “style”, and even “Stylesheet”. But add that last “s” and it bombs out. I’m not sure why this is, but I thought I’d let you know.

    (Until the bug is fixed, I’ll put the CSS file in a “css” folder.)

  52. graywave Mar 29th, 2006

    Very nice. Is this LightShow added to LightBox? Or will LightShow be a different script?

  53. Jeff Luckett Mar 29th, 2006

    Great job. I’m pitching a few projects for which I intended to use (and modify) lightbox to do much of what you’re doing here.

    Well done, and elegant. I like your style.

    By the way … didja notice that Wired.com is using lightbox (or perhaps they’ve coded their own version) for pop-OVER advertising?

  54. Chuck Reynolds Mar 29th, 2006

    Man great new features with that image grouping – I had hacked my own together but yours seems “mo betta”.

    Thanks for the hard work!

    rYno

  55. Serge Mar 29th, 2006

    I reported earlier that the preview did not work in Firefox 1.5, well I’m glad to say that the final version works fine. Great script. I will try it later today on Safari at work; the preview really messed up the screen. Thanks!

  56. Joram Oudenaarde Mar 29th, 2006

    It’s incredible how something so small can grow out to be one of the biggest hypes and subjects on the web! Really nice work, and an incredible update as well :)

    There is only 1 minor thing I’d love to change however;
    - The animation is a tad slow for me personally. Is there a way to speed it up a little (and if so, how?).

    For some reason, with all that fast internet going on around the world, (at least it feels like it), I like portfolio-/imageanimations to go faster :)

    But kudo’s for making this miracle!

  57. torneco Mar 29th, 2006

    brilliant!!

    can I use this for commercial-use?

  58. NM Mar 29th, 2006

    A couple problems – or actually 3.

    1. I get a small box about 20 pixels wide in the bottom right corner of the white “frame??? of the picture that is not filled in.
    2. The images show up in the bottom left corner instead of being centered.
    3. I have tried all of the possible path variations but I can’t get the previous and next images to show up.

  59. Rushi Vishavadia Mar 29th, 2006

    Lokesh,

    That is some amazing work on LightBox 2.0. Really well done! A good example about the power of JavaScript

    Rushi

  60. maro Mar 29th, 2006

    hi, i’ve mede some changes to lightbox. http://maro.kristfest.cz/rocniky/valasske-mezirici-2004/fotky With mod_rewrite it’s very powerfull fotogalery.

  61. Will Stumpf Mar 29th, 2006

    This is awesome thank you very much! i am useing it on my blog (www.willstumpf.com/blog)

    it works fine for me i havent had any errors yet (i havent been using it that long though :p)

    well thanks again!

    Will Stumpf
    http://www.willstumpf.com

  62. ivar Mar 29th, 2006

    Good work!

    One problem though. If the image is bigger than the browser window, the overlay won’t cover the parts you have to scroll to see.

    This was not a problem with lightbox v.1. How can I fix this problem? Appers in all browsers (mac).

    Thanks!

    Regards,
    Ivar

  63. mikali Mar 29th, 2006

    Excellent Work… this is very well done.

    http://mobiko.blogs.com/mutant

  64. JackO Mar 29th, 2006

    Hey, great to see the progress! I updated my photo gallery with the script too!

    ojacko

  65. will Mar 29th, 2006

    I’m having the same problems outlined in message # 58 when i open up my gallery in IE6. It works great in Firefox. nice job!

  66. ivar Mar 29th, 2006

    More problems.

    - I can’t get the “Gets keycode. If ‘x’ is pressed then it hides the lightbox.” to work.
    - Have you removed the “click on picture to close” function?

  67. Jonny Rocket Mar 29th, 2006

    You might want to make sure your DOCTYPE is set correctly. The index.html in the download has the correct setting. I was having troubles in IE and the DOCTYPE was the problem.

    Now my problem, can the caption box be resized for larger captions (I realize its set in the css, but I don’t want to set it to 200px because that doesn’t really solve the problem.)?

  68. Prashant Mar 29th, 2006

    I just took a look at the demo, there’s only one word I can say, amazing!

    Great work!

  69. joeee Mar 29th, 2006

    Person #1:: Who’s the man?

    The World:: Lokesh is the man

  70. ivar Mar 29th, 2006

    #67: My doctype is set (HTML 4.01 Strict), and the code is validated.

  71. will Mar 29th, 2006

    thanks, johnny rocket, that was it. works properly in ie now

  72. Koka Mar 29th, 2006

  73. NM Mar 29th, 2006

    Ok – changing the DOCTYPE sort of fixed it.

    The image now loads in the middle of the page like it should and the missing box shows up. BUT changing the DOCTYPE obliterated my CSS menu. Doesn’t matter if I use 2 different style sheets or incorporate lightbox.css into what I already had. Same results.

    So I’ll keep playing with it ……

  74. Mauti Mar 29th, 2006

    Hi,

    great work! I really love the look and feel of your script, however I miss some functionality from Lightbox 1.0:

    .) Pressing the x key in Safari and Firefox doesn’t close the pic again(I guess you forgot that and it is really easy to add)

    .) Clicking outside the picture frame doesn’t close the pic anymore(also easy to readd I guess)

    Although these 2 things are just small ones I really miss them and hope that you readd them. Further isn’t it possible to add in addition to the mouseover that shows the next and prev arrows, to ask in Javascript where the mouse actually is so if you click on the arrows there are still blend in on the next one. Right now you have to move outside the pic frame and then the script recognizes the mouse and shows the arrows. I think in terms of usability design this would be an important addition.

    Well excellent work, and keep it up!

    Greetings from Vienna,

    Mauti

  75. Mauti Mar 29th, 2006

    Ups my thoughts jumped a bit here again:

    * Further isn’t it possible to ask for the current location of the mouse, in addition to the mouseover that shows the next and prev arrows. So if you click on the arrows there are still blend in on the next loaded picture. Right now you have to move outside the pic frame and then the script recognizes the mouse and shows the arrows. I think in terms of usability design this would be an important addition.

  76. Kevin Mar 29th, 2006

    Here it is incorporated into our site!

    Ezell Aviation

    Check the latest P-38 update.

  77. onlyUMPC.com Mar 29th, 2006

    Hey lokesh – Greak work, now i need to look how i can upgrade my gallery plugin without breaking anything :)

    Thanks for sharing and keep it floating

  78. Michael McCorry Mar 29th, 2006

    Fantastic work Lokesh! Love your work.

    A few of points of feedback:
    1. Prototype.js and scriptaculous.js are very large requirements for projects where bandwidth is an issue. I agree with #41 that Moo.fx is a much smaller (3KB) and equally competent library and works well with their own mini-prototype, Moo.ajax (which is great also). If there was a Moo.fx version of lightbox.js, I would be much more inclined to use it for more projects.

    2. The transition animation could stand to be a little faster. That looks easy to alter in the resizeImageContainer function, however, perhaps a variable for animation duration/delay in the config section at the top might be a good idea.

    3. While on the subject of configuration, it would be great to be able to specify the position of the caption (top or bottom), as well as the corner for the close button (tl, tr, bl or br).

    Thanks, not only for all your hard work, but also for sharing it with all of us.

  79. Carlton Dickson Mar 29th, 2006

    I would love to be able to pop up a page similar to this
    http://www.arsenal.com/player.asp?thisNav=first+team&plid=60089&clid=4421&cpid=703
    so I have the picture and some text accompanying the pic…I need to produce a staff page for a website and need more than a picture.

    If anyone has implemented something similar please post links to examples or even better a web page guiding through the creation process.

    Could this be done with what post #41 mentions…moo.fx?

    Thanks,

    Carlton

  80. BillSaysThis Mar 29th, 2006

    This looks terrific. My question: If I don’t want to show any images on a page, such as a list of galleries, but launch from a text link, can you tell me how to do it?

  81. banglogic Mar 29th, 2006

    Just want to say thanks Lokesh. It’s a great script and it was very easy for me to implement. I’m using it for the photography portfolio section of my site.
    You make me look awesome!

    You can see it in use on my site here:
    http://www.banglogic.com/photography/folio1

    Thanks again,
    -k²

  82. Bart Mar 29th, 2006

    HI:

    Great work! I’ve run into a problem with IE7 (ver. 7.0.5335.5) however. Whenever loading the page, I always get the same error, “line 627, char3, can’t execute code from a feed script”. And the lightbox doesn’t work. Manually refreshing the page always fixes the problem completely. Any workarounds for this?

    Thanks again,
    Bart

  83. codecraig Mar 29th, 2006

    wow…I posted this story on Digg an over 1100 diggs!!!

    woo-hoo!!

  84. Alex Mar 30th, 2006

    Great work! Just found original, and this is much better. Keep em coming!

    Suggestions for future releases:

    Ability to click image or outside image to close image.

    Inlcusion of the resize feature seen in Lightbox_Plus.

    Otherwise, keep kicking ass!

  85. Jason Mar 30th, 2006

    Impressive. Most impressive!

    I set up a test page on my site:
    http://jasonfricke.net/lightbox2

    I made some minor changes to speed it up.

    There are a couple of bugs you will notice there. One is that the forward navigation image does not anchor to the right side of the frame, but floats several pixels inside. Second, the caption box is less than the width of the frame, it is the width of the image. The images are 800×533. I haven’t tried with smaller images yet.

  86. Ryan Mar 30th, 2006

    I just recently came across your gallery system and I am simply amazed. Its freakin awesome. – Ryan

  87. Ravin Mar 30th, 2006

    OK… i’m having a really tough time with this.
    I downloaded the zip file and when i try to open the included index.html in FireFox 1.5.0.1 the sample doesn’t work at first… the image image link takes me to a page with the image in the upper left corner.
    I try again in a few seconds, without closing the tab, but hitting back and then the same link again… and all the pretty stuff works.
    I even tried clearing the cache between the first and second try and I get the exact same results. I’m really confused.
    When I try this in IE it works just fine.
    any ideas?

  88. preben Mar 30th, 2006

    Hello,

    I was trying lightbox V 2.0, but i have a little problem.
    You can see the result at

    http://users.telenet.be/prebenhermans/screen.jpg

    can somebody tell me what i’ve to do, to get the right arrow beside the border?

    Thx

  89. Floria Mar 30th, 2006

    Hi preben, I have the same problem ,too.
    and I has one more problem, the photo isn’t shown in the middle of browser.
    http://img53.imageshack.us/img53/7663/problem6we.jpg

    i dont’ know how to fix, can someone tell me how? Thx.

  90. Dan Mar 30th, 2006

    Nice work, I’ve dropped the Lightbox 2 stuff into my Wordpress install with no problems at all. I did find notice that when I ran a speed test against my site, I was getting 404s for the javascript files called from scriptaculous.js. Are there a couple of files missing from the download?

  91. Otter Mar 30th, 2006

    Is it possible to supress the image’s width and height information?

    Thanks for this great script. I could never hope to write anything like this.

    Paul

  92. audienceone Mar 30th, 2006

    Great script! May I give you a pat? *pat*

  93. kristine Mar 30th, 2006

    You made my day! :-) Really good job.

  94. Dave Mar 30th, 2006

    Hey!

    Great script! And a very nice way of useign jscript…!

    “Just” push the site up, looking n1er – whitout making the user with no-jscript unable to use your page! Great!

    I hope I can include your script(s) at my new browsergame…

    Dave (from Switzerland)

  95. Preben Mar 30th, 2006

    Hello Floria,

    I know the solution for your problem,

    in the lightbox.css file you see in the top this code

    1 #lightbox{
    2 position: absolute;
    3 top: 40px;
    4 left: 0;
    5 width: 100%;
    6 z-index: 100;
    7 }

    Now you have to change rule 4 from
    left: 0; to left:30px; for example.
    I have changed it in my website to left:30%; and now the pictures are in the middle of my browser. So you have to try untill you have the right value.

    Greetz!

    P.S.: If anyone know the solution for the problem in comment #88, please help us!!!

  96. Toadward Mar 30th, 2006

    really nice work !!!
    thank you

  97. peppe Mar 30th, 2006

    I create a wordpress plugin based on your script.
    http://www.4mj.it/lightbox-js-v20-wordpress/

  98. Jono | Iconaholic Mar 30th, 2006

    Brilliant work!
    Donation sent :)

  99. Scott Mar 30th, 2006

    For #82, I had the same problem with the ‘could not execute code from a freed script’. Googled it real quick and came across mentions of needing to have links to the js after meta information. Only showed up in IE. Sure enough, I had pasted the links above the meta; swapped and never had a problem.

    Now I need to figure out the how to fix the right nav arrow not being against the right border in IE7.

  100. Mark L. Mar 30th, 2006

    Great improvement.

    HOWEVER, one of the most important thigs (that is also present in other LB mods) is overlooked: what if the image that is opened is larger (in height, for instance) that the window? overlay no longer cover the buttom part of the screen.

    It’s a simple fix (re-calculating the page size and redoing the overlay image) and I wish I knew JS to make the chane. Would anyone look at this please?

    Thanks :)

  101. Mark L. Mar 31st, 2006

    OK. I played around and added the following:

    if (typeof(originalheight) == "undefined") { originalheight = pageHeight };
    before “return arrayPageSize;”
    AND

    if (imgHeight > originalheight) { Element.setHeight(‘overlay’, imgHeight 180);}
    if (imgHeight <= originalheight) { Element.setHeight(‘overlay’, originalheight);}

    before “this.showImage();”

    perhaps there’s a better solution. this corrects only VERTICAL scroll area.

  102. Jeremy C. Mar 31st, 2006

    I clicked on Lokesh’s donation link, and noticed that only 15 people have donated. Seems to me with so many people using the script and asking for tweaks/fixes/improvements that all the people using this code could at least drop him something for his time and creativity – plus his willingness to share.

    I haven’t had a project to implement this into yet, but will certainly donate in appreciation when I do.

    Nice work, Lokesh.

  103. Paul Mar 31st, 2006

    I’m blown away by this! Your hard work and attention to detail is outstanding.

    Excellent work.

    http://www.pauljamesdesign.com.au

  104. tripdragon Mar 31st, 2006

    are there plans to dynamicly build image list gallerys with this ???
    Like stick the index folder in a folder with lots of images

  105. Brandon Mar 31st, 2006

    I’m trying to implement LB into my MovableType photoblog. My main index contains the current entry, which is a thumbnail image linked to its original. When I create the entry, I use the rel=”lightbox” attribute in the image link tag and it works perfectly.

    However, in the permalinked/archived version, clicking on the image simply produces the new image in a new window, without LB. All the LB code is identical in both templates and the links all point to the same locations. I can’t figure out what the problem is.

    Here’s the site (which isn’t even ready for primetime yet — the only archive is the current entry, so click on the image title to get the archived version): optic anarchy

  106. ecila Mar 31st, 2006

    very hot.

  107. Gabriel Bratescu Mar 31st, 2006

    Very very nice.
    But i have a problem:
    For Preben on #88: How did you rezolved that problem ?

  108. Ethan Mar 31st, 2006

    isn’t there a feature to automatically resize large images to fit inside the screen?

    -Ethan

  109. Preben Mar 31st, 2006

    Hello gabriel,

    i haven’t resolved my problem yet.
    I’m still searching in the code.

    If you know how to fix it let me know plz…

    Greetz

  110. Tiggr Mar 31st, 2006

    Hi!

    The new version works fine for me at: http://www.colorful-sky.de/workshop/index.php?idcatside=79

    Thank you very much!

  111. Gabriel Mar 31st, 2006

    Preben, in your page do you have any other divs ?
    In a simple page, just like the example in .zip, woks perfect.
    But i have a php (smarty) + mysql image galery where i have other divs.
    It seems not to like my divs :)

  112. Johannes Theile Mar 31st, 2006

    Such a great gizmo! How could I have lived without! *gg*
    Please continue the great work!

    Johannes

  113. Gabriel Mar 31st, 2006

    Problem resolved: in lightbox.ccs instead of “53% left” i put “left 53%” , same change for right. Not working in Firefow 1.5 …….

  114. DimP Mar 31st, 2006

    Nice work but you’ve missed a usability problem.

    How should an average first-time user know that you can navigate between images in image sets? I discovered the mechanism by pure luck when I hovered the middle right/left of an image. I think it should be more obvious than that.

  115. oldskull Mar 31st, 2006

    sagerao! lo usare!!!!

  116. Kezia P Mar 31st, 2006

    So far I Love the modification

  117. jc Mar 31st, 2006

    chulo chulo… muyyyyyyyyyy chulo…
    thx for the work!!
    ;)

  118. bish Mar 31st, 2006

    Anyone have the 2.0 zip file around.

    2.01’s movement/positioning are all borked up.

  119. Safirul Alredha Mar 31st, 2006

    I’ve switch addLoadEvent() to scriptaculous Event.Observe for event handling. Plus I’m sort of updating my previous Lightbox plugin — http://zeo.unic.net.my/2006/03/29/lightbox-js-version-20/

  120. Colin Cameron Mar 31st, 2006

    Does anyone else have to put the full url to the images in the lightbox.js? They will only show up if I do.

  121. Jerry Mar 31st, 2006

    Very nice. I may be doing something wrong, but the lightbox windows won’t close when I use images larger than about 500×500 (which I don’t really WANT anway but…). When opening large images the “X” button doesn’t seem to work – not sure if it’s an issue with Firefox or something else. Anway, this is great – I’m not much of a web designer and I got it working in no time.

  122. Juani Mar 31st, 2006

    When using the script on Firefox 1.5 (WinXP SP2) with the Cache disabled, the image that was previously loaded, load first, and then it displays the right image. In IE6 works fine though…

  123. ryan Mar 31st, 2006

    In IE6, it’s not centering the display window, in Firefox it’s fine.

    I’m using

    Naturally, if I drop the doctype, it’s fine. I made any adjustments suggested in the FAQ and read here, to no avail. Any suggestions?

  124. Paul Payne Mar 31st, 2006

    Beautiful! It took about 20 minutes to integrate this into ~400 sites here (click on a photo to be taken to a photo album that uses lightbox). I am really excited to start getting some customer feedback.

    Anyone know why Firefox puts a dotted line around the half of the photo that was last clicked? I think it is a Firefox feature to show the user which link was last clicked… anyone know how to turn this off (in the script)?

  125. Steven Hagen Mar 31st, 2006

    Great job got it working on my site really easy But I not sure how to make indepent captions to say what the picture is about.

    am I doing something wrong?

  126. Floria Mar 31st, 2006

    Hi Preben,
    thx for tour reply, I’ve solve my two problems at all.
    I take the new version Lightbox JS 2.01, maybe you can try it.

    http://www.lokeshdhakar.com/projects/lightbox2/
    v2.01 – Centering in IE6 (any DOCTYPE) fixed.
    Smoothed out resize transition.

    Good luck!

  127. Ben Mar 31st, 2006

    Nice upgrade, but I have 2 ideas and a question:

    Firstly, the fade to black of the background page only seems to happen after the image has loaded, or at least after the white box has appeared. I think this’d look better if the black-out was the first thing that happened.

    Also, when clicking through multiple images, It might look better if one picture faded straight into another, instead of jumping to white and then fading it in.

    Finally, how can I initialise a set of images only using a single link?

  128. Ben Mar 31st, 2006

    Ah no, it wasn’t the late fade-in of the black that I meant, it was the sudden appearence of the empty white box.

    Great script anyway, I’d have no idea how to start something like that.

  129. Brandon Mar 31st, 2006

    Regarding my previous post (#105), it turned out that I had the three lightbox javascript files listed out of order on my archive template. Once I put them back in the right order, everything worked perfectly.

  130. paul Mar 31st, 2006

    I’m using Opera 8 and it seems that the overlay is completely black, as ooposed to being sem-transparrent. It appears to be working ok in FF 1.5 and IE6. Anyone else having this problem?

  131. paul Mar 31st, 2006

    also….. if anyone has any info or a link to somewhere that does on using Lightbox with iframes/dymically loaded pages… feel free to post it. There was some discussion before, but no definate answer…. I just thought I would ask, seeing these posts seem to be more active.

  132. Anonymous Mar 31st, 2006

    ok, ill stop spamming here in a sec. I actually need a solution using lightbox when loading my gallery into divs with AJAX.

    You can see an example of what I mean here:
    http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

    and you can see where I am trying to use it on my site….You will notice it works fine on the main page… but if you click on the ‘portfolio’ link at the top, which dynamically loads the content into the div, lightbox wont work anymore…. any solutions?

    http://www.pauldonnelly.com/portfolio/index.htm

  133. nacho Mar 31st, 2006

    Using wz_tooltips makes the caption disappear. It doesn’t seem to be a font color issue. Is there a way around that?

  134. nacho Mar 31st, 2006

    Nevermind, replacing the first instance of “title” in lightbox.js with “alt” and putting the caption into the alt text restores the caption.

  135. zeek Mar 31st, 2006

    It would be nice, to be able to insert links into the caption.

  136. Safirul Alredha Apr 1st, 2006

    If you use loading ID on your other application this will break Lightbox 2 loading spinner. The spinner will fail to hide or disappear when Lighbox is done finish loading the image.

    It’s either you change Lightbox 2 loading ID’s in lightbox.js and lightbox.css to something else that’s unique or vise versa.

  137. Antti Tuppurainen Apr 1st, 2006

    I have created a huge success Joomla LightThumb based on the lightbox -script.
    http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,412/Itemid,35/

    Fantastic.

  138. TotoMat Apr 1st, 2006

    Hi,
    got a problem under Mozilla 1.5+ and firefox

  139. ToToMat the return Apr 1st, 2006

    Hi, (second post, my precedent message had an html tag, sorry for that)
    got a problem under Mozilla 1.5+ and firefox before 1.5 on Mac OSX : region to click to go to next or previous image is limited by dotted borders after a click. Is there a way to hack that thing ? Thanx in advance…

    TM

  140. Mike Apr 1st, 2006

    Does anyone know how you would center both horizontally and vertically the lightbox DIV within the browser window?

    Currently it positions centrally horizontally however it lies just 40px from the top of the window…

    Any ideas?

  141. Mike Apr 1st, 2006

    Also does anyone know how you turn the image resizing off when you scroll between images in age sets? As I have images of identical sizes…

  142. nico Apr 1st, 2006

    im having the same issue posted in #139

    any ideas?

  143. Vladimir Apr 1st, 2006

    to #132: after you change the innerHTML of a div, run initLightbox()

  144. sialivi Apr 1st, 2006

    #143 Vladimir,

    I have the same problem, but calling initLightbox() after the update doesn’t seem to help.

  145. Rbt. Apr 2nd, 2006

    I noticed someone else mentioned the inability to put links into the captions. I don’t know if that is possible, but if it is I’d love to see that in future versions.

  146. Erby Apr 2nd, 2006

    your are a god among men, I commend you and your hard work. Your script MAKES my site’s gallery, without it, my gallery would be nothing. Can’t wait for the caption update.
    http://serdmanczyk.homeip.net

  147. Hieu Apr 2nd, 2006

    Thanks for your script. But I ran into a problem of the fading property:
    when click on an image, the PREVIOUS image did the fading and then the current image jump out of nowhere. the fading image is supposed to be a current image.

    Please tell me what to do, thanks

  148. Hieu Apr 2nd, 2006

    I forgot to mention that test browser is FF 1.5. This does not happen in IE 6.0

  149. ROFL Apr 2nd, 2006

    ROlF?

  150. Resnumerica Apr 2nd, 2006

    thanks !

    K

  151. Viking KARWUR Apr 2nd, 2006

    Thanks… it’s rocks!

    Greetings from Indonesia.

  152. Keith Apr 2nd, 2006

    Hi Lokesh, I am very impressed with your development of Lightbox JS 2.0. I notice that there is a bug (minor) while loading the image, under Microsoft Internet Explorer (IE). I used IE 7 Beta 2 Preview, and it might occur under IE 6 as well.

    Basically, upon clicking the thumbnail, the background with darken, with the image showing. However, if my page is very long that users need to scroll down, then there I have the “darkened background” isn’t fully 100% of the page. You may take a look at an example here http://keith.hostmatrix.org/location.htm and by clicking on one of the maps.

    The bug is not existence in Firefox; only in IE.

  153. Lewis Apr 2nd, 2006

    I’d also be interested in finding out how you could align vertically the lightbox div as mentioned in comment #140.

    I’ve had a look but havent worked it out yet…

  154. surfer66 Apr 2nd, 2006

    I just plugged it into my web page. wow, worked the very first time!
    Link: http://infinitegood.net/kite/index.php
    Its a small link at the bottom of the page but very cool.
    Thanks dude!
    Pete

  155. Jeff Apr 2nd, 2006

    Lokesh, I’m eager to try out ver 2. Thanks.

    We used Lightbox on a recent interactive on our museum Web site with an imagemap. We’ve gotten some nice compliments on it.

    One thing that would be helpful. Right if you use the title tag to incorporate captions on the images these titles appear when you rollover the thumbnail. Unfortunately, we need to format our captions using italics for artwork titles and the code entities are showing up on the rollover. Didn’t look good so I decided the only workaround I could do was to add the captions within the larger graphics and forget the title tag. It would be nice, however, if there was a way to fix the title tag issue.

  156. the fly Apr 2nd, 2006

    Hi,
    great script. However, background isn’t fully 100% of the page when I try to scroll my page. A little bug: it’s impossible for the user to save/download the images: when I try to right click on the image..the option “save image as..” in firefox doesn’t appear… :(

    best regards from Italy

  157. Torsten Apr 2nd, 2006

    Hello,
    Thanks for awesome functionality.
    I just have one bug problem:

    In firefox 1.5 i get a blinking vertical line somewhere in the middle of the photo , probably just between the active areas for left and right button. This does not occur in IE, and it does not occur on the first photo (with no left arrow) and on the last photo (with no right arrow) so it seem to be related to that. Does anyone know about this problem.
    check it with firefox 1.5 at http://www.aahren.com/photos/

    Thanks a lot

  158. Vladimir Apr 2nd, 2006

    To 144:

    I don’t know what to say except to suggest that you carefully check your code to make sure that all links have “rel=lightbox” AND that you run “initLightbox();” (without any parameters) after you change the innerHTML of a div.

    It works fine, trust me :)

  159. Yuvraj Kalra Apr 2nd, 2006

    So great… Thanks

  160. Jeranon Apr 3rd, 2006

    Hey everyone. I have to agree. Amazing script. I’ve run into some trouble w/ my own use of it (in FF 1.5). If you were to go to: http://jeranon.com/pages/aboutme/ and click on one of the images, you’ll find that the text loads to the right of the images and then “snaps” to the center. Has anyone else had this problem? Does anyone have any ideas why it’s doing this? Any/all help is appreciated. Feel free to contact me@ jeranon(at)hotmail(dot)com
    Thanx all, and Lokesh, thank you for this beautiful script.
    Jer

  161. anthonyjhicks Apr 3rd, 2006

    Hi all, full-marks Lokesh, love the script (I sent a donation to show my appreciation). Anyway, one thing that was bugging me was the need for the page to fully load before the script would init on window.onLoad. So I dug around and applied the technique discussed at http://dean.edwards.name/weblog/2005/09/busted/

    As I have pages with lots of thumbnails that can take a while to download, I wanted to trigger the lightbox init when the DOM had finished loading, and allow the lightbox to be used while the image thumbs continued to download in the background.

    I put the following in my page head to hook the init event to DOM load, and load lightbox earlier:

    function init() {
    if (arguments.callee.done) return;
    arguments.callee.done = true;
    myLightbox = new lightbox();
    };
    /* for Mozilla */
    if (document.addEventListener) {
    document.addEventListener(“DOMContentLoaded”, init, null);
    }
    /* for Internet Explorer */
    /*@cc_on @*/
    /*@if (@_win32)
    document.write(“”);
    /*@end @*/
    /* for other browsers */
    window.onload = init;

    Also create a js/ie_onload.js with a single line:

    init();

    Edit lightbox.js and quote out:

    //addLoadEvent(initLightbox);

    Now init() will run when the DOM is loaded and the HTML is safe (relatively) to be parsed by lightbox, making lightbox usable before other page elements have finished downloading. Seems to work fine on FF and IE 6 on Win32. Not tested on Mac or other browsers, so your mileage may vary. The implemenation of the final window.onload = init; seems to provide backwards support.

  162. Paul Apr 3rd, 2006

    YOU NEED TO SET UP A FORUM!!!!

  163. Amy Apr 3rd, 2006

    Great stuff.. thanks. How would i set it up to open from a text link and display a series of images???? Having to have all the thumbs visable is annoying and limits it’s usage.

    Cheers,

  164. joseph tate Apr 3rd, 2006

    This is beautiful stuff, truly.

    Now to the problem: I’ve gotten it to work successfully on one site, but on another it fails. Could be any number of reasons, but I want to ask point blank and see if there’s an answer: yes or no, is it possible to use rel=”lightbox” on any link tag? and I mean any as in can you have text only and no thumbnail?

    If that question can be answered, just a quick yes or no, I think I can troubleshoot the rest and find the mistake(s) I’ve made.

    And again, THANKS for the work. Once I become un-unemployed, I will be donating. Lots.

  165. Danilo Laurindo Apr 3rd, 2006

    Just great! :)

    Works perfectly!

  166. NM Apr 3rd, 2006

    Got it all working with the new version,

    EXCEPT – I still can’t get the previous and next images to show:

    url(../images/prev.gif)
    url(../images/next.gif)

    which makes no sense because the background shows up and it’s in the same folder, using the same path:
    url(../images/blank.gif)

  167. Edward Apr 3rd, 2006

    Hey there Lokesh …

    Very beautiful effect. One issue, from an IA perspective, is on the sets. It would almost be nice to see a in the bottom right corner, which would let users know that they can shuffle through the set by rolling over the image. Or even moreso, maybe little thumbs of the gallery in the caption space.

    I hate naysayers, so I hope I’m not being one. Thank you for creating some great code. Just wanted to throw a coupla’ things out that you might already be working on.

    Cheers

  168. Mike Apr 3rd, 2006

    To Amy #163…

    I got a text link to show multiple imags using the following code:

    Link Text Here


    Hope that helps…

    Now can anyone offer any advice for my comments mentioned in #140?

  169. Grady Apr 3rd, 2006

    Is there a way to make the caption height taller? When the title is long enough to fit on 3 lines, it runs into the bottom of the lightbox. :o(

    I need it to get taller with the text.

    Any ideas?

    Thanks

  170. Anonymous Apr 3rd, 2006

    oops sorry the comment actually activated the link; the code I used can be seen here:

    http://www.boomspeed.com/mclaren02/link.txt

    View source that page to see it, if that activates the code too ;)

  171. Anonymous Apr 3rd, 2006

    To Grady #169

    In the stylesheet, locate: #imageDataContainer{

    and change the height, which is currently 38px to your desired height…

  172. Johno Apr 3rd, 2006

    Brilliant, brilliant, brilliant!
    2 minutes to setup, and works across browsers; and looks fantastic. I’ll be donating towards this script.
    Great work and thank you!

  173. eric Apr 3rd, 2006

    great code.

    i donated some dough cause you deserve it.

    I think to the point of letting people know that you can shuffle, maybe a simple numbering script would work.

    1/5 images or 1 2 3 4 5 etc…. with current image hilighted.

    thanks again.
    see my use of version one on http://www.contrecoups.com

  174. Grady Apr 3rd, 2006

    Thanks poster #171 :o) … I shortly found that myself.

  175. Anonymous Apr 3rd, 2006

    sads

  176. Buzz Apr 3rd, 2006

    Fantastic script !
    I’m having a problem with version 2.01 though.
    I got version 2.0 working no problem, and then replaced lightbox.js with the new 2.01 version, and it works ok in IE6, but now goes wonky in Firefox 1.5.

    I also tried replacing the scriptalicious.js and protoype.js files with the new onces, but it’s still crazy in Firefox.
    File paths are all fine as far as I can see.
    Do I have to change anything else ?
    Any ideas ?
    Buzz

  177. Brent Dillingham Apr 3rd, 2006

    Great stuff.

    However I wanted to extend this info: I had problems with this in Safari initially — turned out it was due to some filtering that the Pithelmet ad blocking extension was doing for localhost =] So beware, Safari users.

  178. Rizky Apr 3rd, 2006

    yaiksss! it hasn’t been a month since i used the first version. and now there’s the second one. awesome…

  179. MN Apr 3rd, 2006

    Has anyone found a solution yet to the problems mentioned in #152 and #156? If you need to scroll down the page when viewing in IE6, the “darkened background??? isn’t fully 100% of the page. Thanks.

  180. Sean K Apr 3rd, 2006

    I’ve figured out a way to adapt the changes I made to allow Lightbox to work with iFrames to work with Lightbox 2.0. I’ll try to make the changes here more clear.

    Insert the script calls into the header of the PARENT html file as you normally would.

    :

    The following changes are made to the IFRAME contents HTML:

    You will not be adding the REL=Lightbox tags to your HREF’s, instead do the following…

    In the Iframe HTML, change the href of your link to javascript:Void(0) and add an onclick call to a function updateme(this).
    Your link should look like this:
    click here for a larger image

    NOTE: The onclick event points to a script located in the parent document, that’s why it references “window.parent.”

    Also create a form with a hidden form field with a value = to what the href of your link originally was. It should look like this:

    This form is important, it’s going to hold the value that we will pass to lightbox to open the image.

    The following steps occur in the PARENT HTML document.
    In the parent file create 2 functions that does the following.

    Function cloneObject(what) {
    for (i in what) {
    this(i) = What(i);

    }
    }
    Create the function for your onclick event in your link…
    Function updateme(obj) {
    var newobj = new cloneObject(obj);
    var iframe = window.frames['collectionContent']; this has to be the name of your iframe.
    var iframedoc = iframe.document;
    var iframeForm = var iframeForm = window.frames['collectionContent'].document.TheForm; this has to be the name of your frame and your form.
    var hrefvalue = iframeForm.hiddenfield.value; this has to be the name of your hidden field.

    newObj.href = hrefValue
    myLightbox.start(newobj);
    }

    Basically this function clones the values from the original link into a new value and sets the HREF value to the value stored in your hidden form, which should be the path to the image you want displayed. It then passes the cloned link to the lightbox script .

    In order to get this to work with the cloned link value, you have to modify the lightbox.js script.

    In the Start Function section of the script you’ll need to remove the following lines:

    if (!document.getElementsByTagName){ return; }
    var anchors = document.getElementsByTagName(‘a’);

    // if image is NOT part of a set..
    if((imageLink.getAttribute(‘rel’) == ‘lightbox’)){
    // add single image to imageArray
    imageArray.push(new Array(imageLink.getAttribute(‘href’), imageLink.getAttribute(‘title’)));
    } else {
    // if image is part of a set..

    // loop through anchors, find other images in set, and add them to imageArray
    for (var i=0; i

  181. Sean K Apr 3rd, 2006

    Sorry that last post was so long, no other way to get all the information in there…

  182. los Apr 3rd, 2006

    Has anyone tried to incorporate this image zoom in with lightbox?
    http://valid.tjp.hu/zoom/index_en.html

    I’ve been trying, but I’m not so good with javascript.

  183. Sean K Apr 3rd, 2006

    The link in my description post got formatted as html. It should look like this:

    a href=”javascript:void(0)” name=”mylink” onclick=”window.parent.updateme(this)” click here for a larger image

  184. dleifm Apr 4th, 2006

    Howdy!

    Thanks so much for this sexy code! If you’d like to see my version, check it out here:

    http://www.paulnicklen.com/new/Galleries/p_bears.html

    That’s the only gallery that I’ve got up so far, but many others will soon follow.

    If I had any money, you’d have some of it.

  185. Rom S Apr 4th, 2006

    Lokesh,

    This script is by far, one of the coolest things I’ve found on the net. Thank you very, very, much for coming up with it.

    Is there anything at all I can do to convince you to add an auto image resize feature to fit images inside the viewable window like the following:
    http://serennz.cool.ne.jp/sb/sp/lightbox/index.html ? If you could add that, I think my life life truly would be complete.

    Thank You.

  186. Walter Apr 4th, 2006

    Hi,

    great piece of software!
    But there seem to be problems with the calculated height (tested with Firefox 1.5 and Safari 2). The “imageContainer” laps over the “imageDataContainer” so you can’t klick on the close link (or just on the lower part of it). The higher the image (ie 1000 px), the higher the miscalculation.

    Thanks!

  187. uncle wilco Apr 4th, 2006

    Hi donation sent, using it on my shed site

    http://www.readersheds.co.uk/readersheds/share.cfm

    wilco

  188. Jono | Iconaholic Apr 4th, 2006

    Thanks for the update, but there now seems t be a bug :(

    When hovering over the close button/label I have to hover lower than the close button (almost on the bottom edge of the border) rather than the button itself to be able to close the preview. On larger images I can’t close the preview at all.

    Tested in Safari, Camino & Firefox (Mac) & the problem arises on all of them.

    Hopefully this can be fixed :)

  189. Tiggr Apr 4th, 2006

    A good thing is getting better!

    Thank you very much!

  190. Anonymous Apr 4th, 2006

    From comments (#68 Ben Schwarz), (#177 Tony )in the v1 thread, and (#140 Mike) and (#153 Lewis) in this thread…

    Has anyone worked out how to position the lightbox DIV “absolutely” vertically within the browser window – even when the window is resized? It currently positions horizontally but not vertically….

    Thanks and may I reitterate what a wonderful script this is!

  191. Brian Apr 4th, 2006

    Awesome tool !!
    Had problems with Flash though showing on top of image.
    Fixed with adding:
    document.write(”);
    document.write(”);

    and

    wmode=”opaque” menu=”false”
    in the document.write(”)
    statement in a JS file where the flash is called;

    Works great now…

    (Also could have lowered the top down as my flash is only above my menu).

    Thanks.

  192. Lokesh Apr 4th, 2006

    #186, #188 Thanks for catching that bug so quickly. Its been fixed.

  193. Louis Apr 4th, 2006

    This is really some nice work. I like it very much.

    I have a question, maybe for an update: is it possible to so something like this with a video? Exactly the same, but then in stead of a picture, a moving image with sound.

  194. Jono | Iconaholic Apr 4th, 2006

    Great, thanks for fixing it so quickly :)

  195. Jonny Rocket Apr 4th, 2006

    To those using FF and getting the dotted lines around the “active” area, I had this happen on my wife’s computer and just updated her FF install and the problem went away. So I guess the “fix” is to make sure you’re running the most current FF.

  196. Jonny Rocket Apr 4th, 2006

    Just gave 2.02 a try and it’s exactly what i’ve been looking for. Now if only I could get the rest of my site to look as nice…

  197. MrSticks1982 Apr 4th, 2006

    Thank you for a wonderful product, you have saved me a lot of time because this is exactly what I had in mind for my personal website!!

    Keep up the great work!

  198. Spook Apr 4th, 2006

    Wow. Love it.
    You are the best.

  199. Wiktor Apr 4th, 2006

    Just a fiddle-faddle. In the ligthbox.css you suppose that the loading image in the #loading div is inlined.

    In my css the image inherited an display: block, so the text-align: center doesn’t worked. I put this extra line to lightbox.css
    #loading img { display: inline; } and everything works fine! :)

    Thank you for this great stuff! :)

  200. Talguy Apr 4th, 2006

    Can some one tell me why lightbox will not load the loading.gif and close.gif. I uploaded a couple of pictures to the web page that has the same problems as the pages running on my testing server. Can somebody look at my site and the code and tell me why these 2 things do not load up.

    http://www.freewebs.net/gobock/gallery.html

  201. nico Apr 4th, 2006

    still wondering about this FIREFOX bug:

    has anyone figured out how to get rid of the dotted lines surrounding the left or the right side of each picture?

  202. Paul Apr 4th, 2006

    #143 Vladimir
    April 1, 2006 @ 5:43 pm
    to #132: after you change the innerHTML of a div, run initLightbox()
    ———————————————————-

    THANK YOU! That totally fixed it. I’m kinda new to JS so I couldn’t figure it out myself.

    Thanks again.

  203. Vincent Apr 4th, 2006

    hi,

    I’m sure this question has been asked many times before,

    I use the script on my image archive and I have alot of images in one page, but the script will not load until only after the whole page has finished loading. Is there anyway to overcome this?

  204. alan Apr 5th, 2006

    I was wondering, would this script be able to display a Flash file (swf) in a similar manner?

  205. Juan Pablo Reyes Apr 5th, 2006

    its’ very coool!

    i test this script in gallery1.

    You can see it on my site here:
    http://www.mundocarrete.com/fotos
    Thanks.

  206. Thomas Mraz Apr 5th, 2006

    hi,
    that is really great work! i installed lightbox2 within twenty minutes and it´s perfectly working!!!

    THANK YOU FROM VIENNA/AUSTRIA!

  207. Olaf Apr 5th, 2006

    Hi,
    this in scriptaculous.js works not when you XHTML as application/xhtml+xml give:
    document.write(”);

    Have you a Fix?

  208. Olivier Ramonat Apr 5th, 2006

    Hi,

    I have develop slidebox based on lightbox v0.1 to have a slideshow
    support based on XML files. You might be interested to see how I have
    resolved the problem that occurs when user clicks before the page has
    loaded.

    Moreover, with the XML solution you can add images to your slideshow without
    displaying these images on the page. You just have to add a link into the
    XML file.

    http://olivier.ramonat.free.fr/slidebox (this website can be extremely slow)

  209. Steve-0 Apr 5th, 2006

    I was using the old version of lightbox, slightly modified. I also was using the prototype library and scriptaculous’ Sortable effect on my page. After adding the updated lightbox.js, lightbox.css files to my site, my page is getting errors after initializing. The error is:

    ‘Element’ is undefined.

    Also, if i use the

    tag in my page, Sortable won’t work, because if I’m not mistaken Sortable is in a different file than effects. Is there a way around having to declare the same file twice?….or can i just use:

    which would reference all the scriptaculous libraries.

    Any of you javascript gurus are free to jump in on this one…

  210. steve-0 Apr 5th, 2006

    err….my html was omitted from the post above:

    Also, if i use the

    js/scriptaculous.js?load=effects

    tag in my page, Sortable won’t work, because if I’m not mistaken Sortable is in a different file than effects. Is there a way around having to declare the same file twice?….or can i just use:

    js/scriptaculous.js

    which would reference all the scriptaculous libraries.

  211. Steve-0 Apr 5th, 2006

    I’ve solved my own issue…..

    The ‘Element’ is undefined was due to the order of my .js declarations….I declared lightbox.js before prototype.js and scriptaculous.js, which resulted in Element not being defined since it wasn’t parsed at the time of lightbox.js loading.

    It also seems that I can just use
    js/scriptaculous.js
    which loads all the scriptaculous libraries.

    :)

  212. Hans Apr 5th, 2006

    Really beautiful and perfect for my little phot gallery.

    Thank you very much for doing this. Great respect for people that make these incredible beatiful stuff without asking money for it.

    a donation will be comming your way as soon as my site goes online just because you deserve it :P .

    Thanks to you ones again

    Greets Hans

  213. Vectormonkey Apr 5th, 2006

    Brilliant! Absolutely brilliant! I have used it to link to sets from my flickr account, and it works flawlessly. Thanks so much for your time, effort and generousity.

    http://www.vectormonkey.com

  214. Creighton Apr 6th, 2006

    Hi,
    This is a pretty remarkable script! I’m wondering why some people are able to get it up and running no problem, and who others seem to have similar problems? I have two myself:

    1. Although it has been brought up a number of times, I can’t seem to get the overlay to come down over the image. I’ve tried to post

    body{ margin: 0; padding: 0; }

    in the body tag of my stylesheet, but then it seems to affect the entire page. Where exactly is this supposed to go? I am currently using a template CSS that has been validated, so I don’t want to mess things up. It’s not supposed to go in the lightbox.css is it? It would be much appreciated if someone who had success fixing this problem could go into a bit of detail for the rest of us.

    2. Other than that it works very nicely in firefox, but in IE it doesn’t load the overlay at all, and creates a large area for the image to center itself in. The area is much larger than in firefox, and requires the user to scroll down and right to click the close box. Any ideas how to fix this? the example can be found at

  215. Roel krottje Apr 6th, 2006

    To prevent the dotted lines from being displayed when the PREVIOUS or the NEXT area is clicked, we somehow need to implement this feature in the lightbox.js script:

    onFocus=”if(this.blur)this.blur()”>

    .. But I can’t find where exactly… Any help would be apprectiated :)

    Kind regards,
    Roel

  216. Roel Krottje Apr 6th, 2006

    FIXED THE ‘dotted lines’ PROBLEM:

    When you click in FF (and in some older versions of IE as well) you see a dotted line after you click the NEXT or PREVIOS area. Here’s how to fix it:

    For NEXT:
    Search for this peace of text in lightbox.js:

    var objNextLink = document.createElement(“a”);
    objNextLink.setAttribute(‘id’,'nextLink’);
    objNextLink.setAttribute(‘href’,'#’);
    objHoverNav.appendChild(objNextLink);

    Put this after the third line (just above the last line):
    objNextLink.setAttribute(‘onFocus’,'if(this.blur)this.blur()’);

    That’s it. Do the same thing for objPrevLink:
    objPrevLink.setAttribute(‘onFocus’,'if(this.blur)this.blur()’);

    Hope this helps you guys out !

    Regards,
    Roel Krottje

  217. Roel Krotte Apr 6th, 2006

    Comment on post above:

    The copy-and-paste action from my Notepad to this formfield changes the ‘ tag to a ` ta. Make sure you change it after you copy and paste the newly added line above into your lightbox.js.

    Roel

  218. RatSon Apr 6th, 2006

    Hi do you plan to switch to prototype v1.5.0_rc0 (removed Array.shift() function would cause problems when it would just replaced)

    RS

  219. Tim Apr 6th, 2006

    I like this new Lightbox Version :-) !!!

    Just tested it on my side (2min of work). Only thing I noticed is that Opera do not support the bg-opacity. How about a transparent PNG for Opera instead?

    Tim

  220. Allie Apr 6th, 2006

    Hello :)

    Great work, but I’ve noticed 2 things:

    1) I try to validate the CSS, but there are some errors.
    2) Like Tim #219 I noticed that Opera do not support the bg opacity, so the screen becomes black.

    Allie

  221. russell Apr 6th, 2006

    This is excellent work!!! Probably the most exciting innovation i’ve witnessed on the web in years.

    The original lightbox script has been implemented in the gallery on my site at http://www.rootofsilence.com and as soon as I get some spare time (maybe this coming weekend) i’ll look at getting v2 on.

    In the meantime I’ve noticed a small bug with the IE7 beta and the ‘image set’
    On the first image of the set their is a gap between the ‘next’ button and the white border of approx 10/15 pixels. If you then move to the next image the gap appears on the ‘next’ but will dissapear if you mouse over the ‘prev’ although wil re-appear if you ‘mouse-off’ and then back over.

    Also can anyone give any feedback on accessibility issues – I’m trying to convince my manager at work that this is fine from an acessibility point of view – but he’s having none of it…..

  222. Bradley Spitzer Apr 6th, 2006

    Hey, I just have to say that I LOVE Lightbox and that it has worked beautifully on my portfolio site.

    http://www.bradleyspitzer.com

  223. Kinetic Mix Apr 6th, 2006

    Please could someone help me out. I have just downloaded the Lightbox 2.02 update and uploaded all the files to my website in a test directory but when I go to click on the picture on the test page that was supplied the image loads at the very bottom of the screen with no transparant overlay appearing at all. Would someone please mind taking a look at this for me to see what is going wrong. I don’t understand it as i have just used the downloaded files and have not made any modifcations. Thanks in Advance !! TJ

    http://www.kineticmix.net/codered/index.html

  224. marc Apr 6th, 2006

    great, awesome! thanks!

  225. Erby Apr 6th, 2006

    hey, I love this script, works the best of any I have, have trouble with keyboard nav though. I think it may be a safari issue. –suggestion– another great update to do in the future, probly would be easy, but you could add a comments feature to the script. couple more updates and this script could rival flickr maybe. It’s super awesome.

  226. Tim Apr 6th, 2006

    Awesome stuff! Is there anyway you can configure it to automatically scroll through all the images if it is part of an image set – like show each for 2 seconds and move on? That would be really neat….

  227. Art Apr 6th, 2006

    So easy, so fast, so elegant. You’ve made the web a better place! A+

  228. Will Apr 6th, 2006

    I just updated to v2.02, its very nice thank you very much! you are amazing ;)

    Will
    http://www.willstumpf.com

  229. giles Apr 7th, 2006

    blog design is perfect. lightbox script a revelation. trying a mix with flickr. going for a sans flash nicholas grimshaw site. Thankyou.

  230. zwicky Apr 7th, 2006

    #223

    Replace the following HTML tag in your page:

    with

  231. Fuzzy Apr 7th, 2006

    Like #204, I too would like the ability to show Flash swf instead of a picture. Maybe pass a parameter in there somewhere to decide the type of content.

  232. Onizuka Apr 7th, 2006

    i’m testing the lightbox V2.0 for my crew website (http://www.mangajima.com). it’s really great but no resize for the pictures who are too big for the frame or IE/Firefox window. Is it possible to set this possibility? (like lightbox plus if my memories are good) (sorry for my bad english)

  233. Robbie Done Apr 7th, 2006

    Great work, what a breath of fresh air this is!

  234. Simondo Apr 7th, 2006

    #230

    Could you please either email that

  235. Simondo Apr 7th, 2006

    #230

    Bah, apologies for my previous post!

    I have the same prob as #223 and need to know what change/s are needed to be made to the HTML if any???

    http://www.simonturnerphotography.com

    Top piece of code Lokesh!!

  236. Phil Apr 7th, 2006

    Someone did a great mod of Lightbox 1.0 to work with flash -

    Can someone do it? I am no JS coder!

    you normally call lighbox by adding rel=”lightbox” in html, but it doesn’t work with flash – so the flash mod let you call it like this:

    “javascript:lightbox(“http://url.to/image.jpg”,”This is my caption!”;);

    And it would work lovely as long you put the JS in the flash’s HTML file!

    Please someone have a go! I’ve had a look and it’s different to 1.0

    (great coding job btw!!)

  237. Greg Apr 7th, 2006

    Flash support would be excellent

  238. bippym Apr 7th, 2006

    great script, i want to call it from flash too tho, the old version does it right?

  239. Bruce Gilbert Apr 7th, 2006

    I love the script, however for me I can’t get it to work in IE6. Works fine in Mozilla, Netscape and Firefox.

    I am using the script on this page:

    http://www.inspired-evolution.com/AJAX_Images.php

    any ideas why it may not be working in IE? I didn’t change anything from the download…

  240. Anonymous Apr 7th, 2006

    Simondo and Kinetic Mix,

    The most likely cause of the behavior you are both seeing is that your lightbox.css file isn’t in the right path. Make sure that you have the lightbox.css in the expected path that you have listed in the HEAD section of your HTML. To test you can try moving the .css file into the same location as your HTML page and not specifying a path. (You still need to declare the lightbox.css though).

    I’d describe better, but the blog really doesn’t like HTML code, which makes it difficult.

    Sean

  241. kwabe Apr 7th, 2006

    I was wanting to know if and or how would one be able to load a swf, mov, or flv file in the lightbox. instead of image files

    and thanks for the great tool

  242. Michael Apr 7th, 2006

    Great job on version 2. I have 2 small issues with it though:

    First, the next and previous buttons are cool, but may not be obvious enough for the less “computer literate” people who use my page. I’ve made a small change to the script which adds more obvious links. You can see an example here: http://www.palintest.com/products/multiphot/7500 – I hope you would consider including this change in the next version.

    Secondly, the loading image appears to be stretched when displayed in IE- any idea why this could be?

  243. doxa Apr 8th, 2006

    This is a really cool JS! I’m using it for my blog:

    http://africa06.blogspot.com/

    I really like the “Click to close” feature from ver. 1 of Lightbox. How can I implement that feature in ver. 2? (I’m not a JS writer) It would be useful especially when I’m using Lightbox for one picture at a time. When there are series of photos with separate thumbs (like in my blog), it’s tedious to move the mouse to “Close X” every time. It would be nice if I could close Lightbox just by clicking on the picture instead of the “Close X.”

    Thanks for sharing!

  244. Adding links to captions Apr 8th, 2006

    I noticed that some of you wanted to know how they could add links to captions.

    This is how I’ve done it and it works :
    Visit site‘>details

    in other words add a Visit site‘—–>to the a tag.
    this is the link where you can check it out
    http://www.awholeuniverse.com/portfolio.php

    BTW did anybody succeed in validating the lightbox.css file?

  245. Jay Apr 8th, 2006

    I noticed that when I downloaded lightbox2.02.zip that the version in the lightbox.js file is 2.01

  246. ryon Apr 8th, 2006

    i love this.

  247. jasperguy Apr 8th, 2006

    I was playing around with the cssplay site with the simular lightbox gallery and just could not get it to work out. I was trying to avoid the javascript, but I think that is the way to go.

    I like the way your examples are just the raw scripts, that way I can intergrate it into my projects much easier. Thanks for the hard work.

  248. Micheal Apr 8th, 2006

    is there any details on how you implemented the next and previous image to the script? nicely done btw.

  249. Lokesh Apr 8th, 2006

    #241 kwabe – Lightbox JS v2.0 is solely intended for displaying images. There are some modifications of v1.0 available that support other media: Lightbox v1.0

    #242 Michael – Reset your cache in IE and see if the loading image still appears stretched. As for more obvious prev/forward links, it is something I have debated and might work towards in an updated version.

    #243 – I’ve added some instructions on how to add links in the caption here: Lightbox JS v2.0 support

    #244 Jay – The Lightbox JS 2.02 zip contains the latest files, I had just forgotten to update the version number in the script file.

    #247 Micheal – For some insight on how I implemented the prev/next navigation look at the start() method of the Lightbox class and also review the html created in the initialize() method.

  250. Lokesh Apr 9th, 2006

    #219, #220 Tim, Allie – Opera doesn’t support the background opacity, but it holds up fine otherwise so I don’t worry. As for the CSS not validating, this is due to the clearfix rules. I’m not sure if there is equivalent validating code that.

    #232 Onizuka – The Lightbox Plus modification allowed you to ‘resize’ pictures that were to big for the viewport, but it also required multiple images and hardcoding an array into your html. I’ve left out the feature for simplicity’s sake.

    #236, #237, #238 – You cannot currently call the script from inside of a Flash movie, but if someone wants to work on adding that capability, please do.

  251. bugzie Apr 9th, 2006

    Here is a Drupal 4.6 Module available for download:

    http://cvs.drupal.org/viewcvs/drupal/contributions/modules/lightbox2/?only_with_tag=DRUPAL-4-6

  252. Los Apr 9th, 2006

    Is there a way to attach mouse events to the image container div?

  253. Tiggr Apr 9th, 2006

    >#242 Michael – Reset your cache in IE and see if the loading
    >image still appears stretched.

    It’s the same for me, getting a streched loading image in IE6 and IE7, even after cleaning the cache!

  254. Matt Apr 9th, 2006

    Hallo!
    This lightbox JS v2.0 image view is the best I have tried. but i have some problems, my homepage is using ifram so when i run the script the image opens in the ifram but i want it to open on the whole page, how do it do that?
    please help me!

  255. Rom S Apr 9th, 2006

    Thanks again Lokesh, for such a fantastic script!

    I’ve finally been able to add all the pieces I wanted, like links and auto-resizing to fit the browser if the image was too big.

    You can see it working at:
    http://romsrini.name/flickr/set_album/1739364

    The resize code may be ugly, since I don’t know javascript very well, but it seems to work:

    in the ‘changeImage: function(imageNum)’ function, i just modified the second half:

    // once image is preloaded, resize image container
    imgPreloader.onload=function(){
    Element.setSrc(‘lightboxImage’, imageArray[activeImage][0]);

    //resize code
    var arrayPageSize = getPageSize();
    var targ = { w:arrayPageSize[2] – (borderSize * 2), h:arrayPageSize[3] – (borderSize * 6) };
    var orig = { w:imgPreloader.width, h:imgPreloader.height };
    //// shrink image with the same aspect
    var ratio = 1.0;
    if ((orig.w >= targ.w || orig.h >= targ.h) && orig.h && orig.w)
    ratio = ((targ.w / orig.w)

  256. Rom S Apr 9th, 2006

    Just finishing up the code from the last comment:

    if ((orig.w >= targ.w || orig.h >= targ.h) && orig.h && orig.w)
    ratio = ((targ.w / orig.w)

  257. Rom S Apr 9th, 2006

    Sorry for the repeated comments, but one of my lines of code seems to causing issues with comment formatting:

    var new_width = Math.floor(orig.w * ratio);
    var new_height = Math.floor(orig.h * ratio);
    photo = document.getElementById(‘lightboxImage’);
    photo.style.width = (new_width)+ ‘px’;

    myLightbox.resizeImageContainer(new_width, new_height);
    }
    imgPreloader.src = imageArray[activeImage][0];

  258. Revanta Apr 9th, 2006

    Could anyone tell me if there’s a way to change the color of the text for the “title” of the images? I can’t figure out what CSS property to modify.

    I’ve tried creating a class for the img and putting a text-color attribute to it, but that hasn’t worked for me.

    Would appreciate some advice.
    Thanks!

  259. Revanta Apr 9th, 2006

    NEVER MIND!
    Found the #image data caption property right after I posted my msg. Sorry!

  260. Quola Apr 10th, 2006

    This is a little unoriginal but… this script really is amazing. Total AWSOMENESS. Thanks so much for sharing it! I was wondering if anyone could help me? Flash seems to come in front of the lightbox. I’m an amteur and kinda clueless about what to do. I’d really appreciate it.

  261. Chris F Apr 10th, 2006

    Would love to see an auto resize feature implemented in this, like with lightbox plus. A lot of user uploaded images are bigger than the screen unfortunately which is why an auto resize to fit the screen would be really useful.

    It looks great though, keep up the good work.

  262. Quola Apr 10th, 2006

    Wow, nervermind, I found out how to solve my problem, but it would be nice itf it would work in Firefox as well. Oh well. Thanks again for this fantastic script.

  263. Catharsis Apr 10th, 2006

    If your images aren’t loading correctly (loading, closelabel), check the .js to make sure the paths in the config section are adjusted relative to the page, not the .js file.

    In other words, if your images are in /images and your js files are in /js, the paths to the images don’t have to be “../images/loading.gif” and so on… it’s just “images/loading.gif”. Silly error, but took me a while to fix. Hope it helps!

  264. Kirk Apr 10th, 2006

    Just started using v2 and the changes are superb. I’ve noticed the script runs noticely slower in Firefox compared to IE6 but I expect that’s due to the extensions installed or perhaps firefox needs to be restarted. Just wondering if anyone else has noticed any slowdowns (mainly in the fading in/out).

    Thanks for the awesome script.

  265. C.S. Heng Apr 10th, 2006

    Awesome script. It rocks. and Thanks for such a good work!

  266. matic Apr 10th, 2006

    I also have the ‘loading.gif’ spinner image stretched issue in IE6. Can’t seem to pinpoint why. Any ideas?

  267. Jeff @ equivocality.com Apr 10th, 2006

    Amazing work, Lokesh!

    I only have two suggestions:
    1. Instead of loading the image directly, load the image as a background in a table cell, with a transparent overlay gif. That way, people have a bit of built-in image piracy protection (My pictures are constantly being hotlinked from my server to their myspace pages). I know it won’t stop people who REALLY want to get to the pictures, but it’s an extra step that I think would stop the majority of the stealers.

    2. Perhaps have a lightbox “lite” version, or transitions that can be configured in the javascript: I much prefer the simple version 1 for my usage. The fancy transitions are beautiful, but render rather choppy on a few computers I’ve tested it, especially high resolutions like 1920×1200.

  268. EgOiStE Apr 10th, 2006

    Love the lightbox. Tried using 2.0 with the Lush theme but I think the Body load command is making it not work, even after including your modification to the body tag. Just an FYI for anyone else out there reading the comments.

  269. doxa Apr 10th, 2006

    Somehow my post (#243) dissapeared for a bit, and reappeared, and was never answered. Can anyone answer my question? (i.e. how do you make it so that lightbox will close upon clicking the actual image, not just the “Close X” button? It used to do this in lightbox v.1) Thanks!

  270. Olle Apr 10th, 2006

    Hallo!

    I have some problems, my homepage is using ifram so when i run the script the image opens in the ifram but i want it to open on the whole page, how do it do that?
    and how do i do to automatic reseiz the images to fit the window?

  271. Onizuka Apr 10th, 2006

    thx Lokesh and Rom S

  272. rul Apr 10th, 2006

    Hi!
    congrats for lightbox 2.0 it’s cool!!

    I’ve set up it in my blog and i have a little problem, the problem is with youtube embed player (a flash player), when zoom a image the player is in the top, hiding part of the image.

    I’ve tried the solutions i’ve found in this and other sites, with no luck.
    Any idea??

    Thanks

  273. Wizz Apr 10th, 2006

    Lightbox v1.0 was amazing, but v2.2… Astonishing!

    Great work! :D

    Thanks!

  274. Revanta Apr 10th, 2006

    Does anyone know how to make aa quicktime video work inside the light box? I have the lightbox open an simple html page with an embedded quicktime video but all I get is the Q icon with a “?” in front of it. I’ve checked and I’m sure that the path to the video is correct.

    Here’s the code i’m using in the html page:

    Would really appreciate some help.
    Thanks.

  275. Revanta Apr 10th, 2006

    Ok, guess I can’t post html code in the blog.

    Anyway, this is what I tried to show video in the lightbox:
    embed src = … width = 320 height = 260 auto play, etc etc with all the standard quicktime embedding code in a simple html page.
    The page displays but only a Q symbol with a ? in front of it.

    Help please!

  276. Anonymous Apr 11th, 2006

    is there somethin wrong with the page maby?
    my downloads wount start and yeasterday the whole site was offline..
    atleast i think so, im behing a shitty-freggin-admin-cant-configure-his-network-properly school proxy, just tell me the webpage is fine and ill go teach him some things

  277. jasperguy Apr 11th, 2006

    So I finally came back to this page! whew. I was reading 248 and wanted the same feature. Rom has implemeted on his flicker site. I looked in the lightbox class, and found this:

    “If image is part of a set, add siblings to imageArray”

    Does that mean I have to name my images in consecutive numbers for the next and previous to show up in the caption area? And will the links be activated?

  278. Braindread Apr 11th, 2006

    Could some one possibly try to up the lightbox2 zip file on yousendit.com or any other website, so i could try to download it..Im making a school projekt and would really need it

    iv been surfing google for a while now and all the links seem to go to the original page, wich i cant seem to get to work

  279. shortly Apr 11th, 2006

    I have a problem, the close image and loading image are not displaying. area is still clickable for close image. prev and next images loading fine. i’ve waded through the code as best i can but can’t find anything askew…

    also clicking outside the lightbox doesn’t return to the page.

    same as for #200 Talguy
    checked #263 suggestions but no help

    anyone else got any thoughts on this?

    webpage here if anyone wants to check.
    http://davidandjacob.com/art/media/pics/

    btw, i love this script. thanks for all the hard work.

  280. shortly Apr 11th, 2006

    ok. scratch that.
    #263 was right… i ended up putting in an absolute path to the images and it worked fine. for Talguy #200 i suggest you try the same. the confusing part was that the CSS references the prev/next graphics relatively and works (because CSS is linked?) but the JS places the code in at the directory level the page loads at (at least that’s how i’m thinking about it) and therefore doesn’t work with a relative path.

    eeeek.

    thanks again.

    oh. the clicking outside lightbox only works above and below to return to page – not on the sides. is this how it should be working?

  281. Benjamin Apr 11th, 2006

    This script is definetely awesome. I was looking at discussing it on the upcoming ajax section of http://rubyonrailsblog.com along with some other ideas we had for JS. Very cooL!

  282. Neil Apr 11th, 2006

    So impressed with the original I switched all my photos to this within 48hrs!
    In V2+ How can I change the location of the next / prev indicators ?
    I wanted to put them at the foot of the image preferably in the caption area so the picture is clutter free.
    Many thanks

  283. Jeroen Apr 11th, 2006

    how can I change the position of the image container?
    where do I need to make changes in the css?

    Many thanks

  284. Zach Apr 11th, 2006

    Hi all, first wanted to say what a great script! Having a little issue with it though. I’m trying to incorporate it with a random image script I have and have gotten the popup to work, but can’t get the title to work. On my site, http://xhtml.shotland.com/portfolio/ on the right sidebar where my featured sites are located if you click on the image lightbox will open up, but not put the title of the page there. The script I’m using is: http://xhtml.shotland.com/js/projects1.js. I’ve tried various ways to get the title to work, but haven’t had success. Does anyone have any ideas? I’d greatly appreciate any help. Thanks

  285. Xander Apr 11th, 2006

    I am having trouble getting LB to work period. I am using a template but I am not too sure how to set it up using a template I always see it setup on single pages. If anyone can help me or give me a link to a website I would be very thankful. Thank you for your help.

  286. Prophet Apr 11th, 2006

    Having a bit of trouble getting the Prev / Next buttons to display.
    I’m running IE6 with Dean Edwards’ IE7 JS Patch, so I can use “position: fixed;” on other elements of the page (not LB).
    The prev/next links are functional when clicked, but they do not display. It works in FireFox, so I know my JS and CSS are right…but not IE6.
    Any suggestions?

  287. turk Apr 11th, 2006

    i took that #255 did and expanded on it.
    check it out here.
    http://www.turk-182.com/eMortal/index.php?section=album&a=11

    It resizes images to screen and then puts a zoom button at the bottom right.
    Just check the source and grab the js file along with the lighthouse.css for the added class.

  288. jasperguy Apr 11th, 2006

    #280 – I guess you got it to work, great. Just a note if your js file and your css files are in different folders, and you use a relative url, you should remember to use this “../” (dot dot fwd_slash)to call it to the main root of your web files. So something like this: “../js/lightbox.js” or for the images “../images/next.gif” . Correct me if I am wrong, if you use an ablsolute url, you might run into the trouble of the quotes in the js scripts. Like the caption area when you need to put a link.

    Thanks for updating the next / prev issue on the support page! The “[imageset]” is genuis, so simple to add.

    Would like to attack the same issue as #282 now.

  289. Jason palmer Apr 12th, 2006

    #283…

    I have the same question. I’d like to move the “popup” down a bit to match the layout of my webpage.

    i do love this script.

  290. Roel Krotte Apr 12th, 2006

    Arrow Keys functionality in IE and FF.
    ———————————
    For those who’d like to add ARROW KEY functionality (left / right) for navigation purpose, here’s how to do it:

    In Lightbox.js, search for the keyboardAction function:
    ————————————————-

    keyboardAction: function(e) {
    if (e == null) { // ie
    keycode = event.keyCode;
    } else { // mozilla
    keycode = e.which;
    }
    key = String.fromCharCode(keycode).toLowerCase();
    if((key == ‘x’) || (key == ‘o’) || (key == ‘c’)){ // close lightbox
    myLightbox.end();
    } else if(key == ‘p’){ // display previous image
    if(activeImage != 0){
    myLightbox.disableKeyboardNav();
    myLightbox.changeImage(activeImage – 1);}
    } else if(key == ‘n’){ // display next image
    if(activeImage != (imageArray.length – 1)){
    myLightbox.disableKeyboardNav();
    myLightbox.changeImage(activeImage + 1);
    }
    }
    },

    Change the above function to this one:
    ———————————-

    keyboardAction: function(e) {
    var keyCode =
    document.layers ? e.which :
    document.all ? event.keyCode :
    document.getElementById ? e.keyCode : 0;
    key = String.fromCharCode(keyCode).toLowerCase();
    if((key == ‘x’) || (key == ‘o’) || (key == ‘c’)){
    myLightbox.end();
    } else if(key == ‘p’ || keyCode == 37){
    if(activeImage != 0){
    myLightbox.disableKeyboardNav();
    myLightbox.changeImage(activeImage – 1);
    }
    } else if(key == ‘n’ || keyCode == 39){
    if(activeImage != (imageArray.length – 1)){
    myLightbox.disableKeyboardNav();
    myLightbox.changeImage(activeImage + 1);
    }
    }
    },

    Now you’ve got full ARROW key functionality in both IE and FF.
    Good luck !
    Roel.

  291. Carlos Apr 12th, 2006

    Hello, I have the same problem than #191 Brian.
    Flash shows on top of the image. I read what he did but I did not understanded it. Can you help me?

  292. Michel Bozgounov Apr 12th, 2006

    Great piece of software! One of the best “Pure XHTML/CSS/JS galleries” I have ever seen! Thank you! I am eager to try on my own website http://www.lelion.info one of these days, when I finally will have some time to design for MYSELF ;-)

    Thank you again!

    I see btw, PNG is not working in IE 6 (as expected;-), would be nice when IE 7 will appear (final version), I think:)))

    Good luck! And thanks again!

    Michel

  293. Neil Apr 12th, 2006

    #290
    Thanks for the key controls. Sound addition.
    #287
    Like the lightbox plus (resizing) functionality, but can’t view your source or get .js. How do you ‘de-size’ expanded image?

    Just need to get #282 sorted now.

    This is actually fun!
    Thanks all

  294. Jasperguy Apr 12th, 2006

    #290 Roel, great post to quickly plug and play, just tried it and it works 100%

    #293 same with neil, would like the feature of next and previous in the caption area, so that it is visible for the less “web savvy” visitors.

    Thanks

  295. turk Apr 12th, 2006

    #293 not sure why you cant see the js
    http://turk-182.com/eMortal/js/lightbox.js and i didnt do a shrink function. when you click next/previous it shows it resized again.

  296. Neil Apr 12th, 2006

    #255 Rom S
    Seems to have got what I was after (#282) sorted.
    Will he share the secret?
    #295 turk
    thanks got the js ok

  297. Neil Apr 12th, 2006

    #295 Turk
    Sorry, got the js but what are the additional css modifications?
    Thanks

  298. derek pennycuff Apr 12th, 2006

    i’m using lightbox2 for my wife’s photography site. i’m gonna try to mine some extra controls for it from meyer’s S5 to put additional keyboard functionality into the navigation. i’ll send you anything i produce that proves to be useful.

  299. Neil Apr 12th, 2006

    Further to #290 Roel
    At the line (in his code)…..
    if(key == ‘n’ || keyCode == 39)
    which looks for the letter n or the right arrow to go to next image.
    Modify to read
    if(key == ‘n’ || keyCode == 39 || keyCode == 32)
    that will allow you to also use the space bar to go to next image.
    Also to save you looking code 38 is the Up arrow, code 40 is Down arrow.

  300. Aryana Apr 13th, 2006

    This is really nice! I think I’ll use it for my portfolio. I love how it’s so easy to implement and customise :)

  301. Cat Apr 13th, 2006

    Lightbox JS v2.0 is very nice!!
    However,can i apply this effect in homepage with frames?
    When i click the thumbnail picture,the effect only shows in the same frame. Can it show in the whole screen and keep all the frames constant?

  302. Nick Toye Apr 13th, 2006

    Is it possible to have the close button a rollover button?

    Can I have the back and next buttons more obvious and not hidden in the picture, I would like to have them alongside the close button.

  303. Cat Apr 13th, 2006

    It is the problem i mentioned before:

    http://hk.geocities.com/catgirl616/page.htm

  304. Justin Apr 13th, 2006

    Same problem as a few others. Close button and loading don’t work. I have the paths as “images/loading.gif” and “images/closelabel.gif” but still nothing.

    http://justin.ani-6.com/

    thanks if you can help!

  305. Paresh Apr 13th, 2006

    In response to #302 from Nick Toye:

    I also wanted the Next/Prev to be permanently displayed and have tried the following CSS change (lightbox.css):

    #prevLink { left: 0; float: left; background: url(prevlabel.gif) left 0% no-repeat;}
    #nextLink { right: 0; float: right; background: url(nextlabel.gif) right 0% no-repeat;}
    #prevLink:hover, #prevLink:visited:hover { background: url(prevlabel.gif) left 0% no-repeat; }
    #nextLink:hover, #nextLink:visited:hover { background: url(nextlabel.gif) right 0% no-repeat; }

    Basically, I added the ‘background’ property to #prevLink and #nextLink.
    Also, I changed the location from 15% to 0″ which puts them in the upper left/right corners of the screen.

    You can try playing with the same properties if you want to locate it elsewhere.

    Thanks Lokes, WONDERFUL piece of code!!!

    — paresh

  306. AK Apr 13th, 2006

    Thanks much. Can I use it on my site, any licensing needed?

  307. jasperguy Apr 13th, 2006

    #308 Justin,

    If you are going to leave a link to show us the problem, perhaps you should have that demo running. My guess is that you should try and read #288.

    #305 Paresh

    Can we have a link to see what you have done?

  308. Nick Toye Apr 13th, 2006

    #305 – Cheers Paresh,

    Can we add a caption to the set rather than just the title when we use grouped images?

  309. Joost Apr 13th, 2006

    Question …
    How can I implement this great tool into http://www.simplephpblog.com ??

  310. Eddie Apr 13th, 2006

    @ Paresh #305, or anyone who’s tried. I’ve tried to add the next and prev buttons, but to stay constant iin an image set, but am only having luck with the prev button. I still have to hover for the next button. CSS is right on. Any advice?

  311. Anonymous Apr 13th, 2006

    Has anyone found a way of:

    #1 – Adding a rollover effect to the close button
    #2 – Adding the value that is in the rel tag as a set title in the image

  312. Sandeep Singh Kunwar Apr 13th, 2006

    Funtastik Stuff!! Must Appriciate ur work.

    but missing badly a essential feature !!
    If some one wants to just sit & enjoy ur creation, their is no way, we have to use keyboard or mouse.
    I wish it works as a slideshow :-D, switching images itself.
    Just sitting and enjoying is the stuff we used to like ;-D

    Thanks a lot!!
    Waiting for positive response.

  313. turk Apr 13th, 2006

    #297 heres the css
    #imageData #bottomNavZoom{ width: 34px; float: right; padding-left:15px;padding-bottom: 0.7em; }

  314. Scot Apr 13th, 2006

    #305 … it’s actually even easier than that …. remove the :hover and the prev next will become perm. I’ve been using it successfully with ie6/ie7 and firefox with my blog since the initial 2.0.

  315. Nick Toye Apr 14th, 2006

    #314…Scot, that’s good, but do you know how we can get the prev and next buttons next to the close button?

  316. Digit Neave Sony Mazda Apr 14th, 2006

    Holy smokes! It’s SWEET! I’m making the site http://www.digitnsm.com (should be online by July) and I used this for pictures. My brother’s eyes went YOINK and he’s like WOAH WHERE’D YOU GET THAT! Thanks so much Lokar

  317. Alconis Apr 14th, 2006

    I’ve just released a DotClear plugin adaptation of LightBox JS v2.02. Very nice work ! Fully integrated and using wiki syntaxe to generate LightBox links. To see what is dotclear go to dotclear.net. I could not find how to make a trackback to this article. So here is my article about the plugin.

    http://www.alconis.com/dotclear/index.php?2006/04/14/116-lightbox-js-pour-dotclear

    Watch out ! This is written in french.

    Keep up the good work !

  318. Michelle Apr 14th, 2006

    Wonderfull script. ^_^ Very much worth the effort it’s been to integrate it into my site. Thank you so much for sharing.

  319. Imaginaryday Apr 14th, 2006

    is there a way to add an exif data function support to this marvelous script …

  320. Andrea Apr 14th, 2006

    Version 2.02 doesn’t work properly in Firefox 1.5.0.1 on a Mac under OS X Tiger. Whenever I click on the example gallery thumbnail images, it throws the larger images into a new page instead of overlaying the current page with the larger image. The older version of lightbox (version 1) works properly in the same browser.

    I tried lightbox 2.02 in Safari on the mac and it worked great. And it worked fine in Firefox on the PC. But I need it to work in Firefox on the mac too.

  321. Paresh Apr 14th, 2006

    #307 jasperguy, #310 Eddie:

    I’m still testing various options, but for a temporary work in progress, see one of the two links below:

    http://www.oopalioperajita.com/gallery2.html

    http://www.oopalioperajita.com/gallery.html

    If you dont find one link, try the other. I am in the process of editing that site.

    #314 Scot: you are right. But I left the hover in there, in acse I want to revert back to the original.

    #310 Eddie: I think it’s probably a typo in your CSS. If you’re seeing PREV and not NEXT, you probably forgot the CSS for next. See #305 for details.

  322. Tracey Apr 14th, 2006

    FWIW: This is really not an ad, just something that may appeal to others- JAlbum (http://www.JAlbum.net) is a rather superb freeware product (any OS-it’s Java based) to make web albums of digital photos. It offers over 100 (also free) “skins” to create completely different image albums. The main point here is, the “ShowLite” skin (sample at http://www.taskmine.com/JAlbum/ShowLite/) makes use of Lightbox to “easily” produce photo albums of any size . A new version using Lightbox 2.02 should be out next week.

  323. baZzz Apr 14th, 2006

    Wow, great stuff! Keep it up Lokesh!

    I liked some of the fixes/mods/hacks that were mentioned here on the comments page, so I integrated them in a default Lightbox 2.0.2 installation to save the people who like them as well some trouble. These modifications are:
    * Auto resize of images larger than browser size, by Turk [#287]
    * Keyboard navigation by means of arrows, spacebar and backspace, by Roel Krotte [#290]
    * Fix that prevents images (in FF) from displaying dotted lines around them when clicked, by Roel Krotte [#216]

    Just for reference, I call this Lighbox 2.0.2+ (Catchy name, huh? ;-)

    I zipped them up together with some more example images in this file here: http://baZzz.com/lightbox/lightbox2.02+.zip

    Enjoy!
    -Bas

  324. Son! Apr 14th, 2006

    Skiping Pictures…when clicking on Next

    I would like to know if anyone else has this problem and how to solve it, for exemple, I had 10 pictures on a site, and once i clicked the next button, it will go from the 1st the 3rd, 5th, 7th, and 9th picture skiping one in between! is there any way to resolve or finding what’s causing this?

    I just love this script,

  325. taare Apr 15th, 2006

    You should set the color property in the css to #000 or something. I had set my default color to white, and couldn’t see the caption e.t.c. for my images. Otherwise, it’s a excellent script.

  326. Glenn Apr 15th, 2006

    Lokesh, excellent work. I just started using ver 2 and am very impressed.

    I trolled the comments but only saw 1 reference to my issue – is there anyway to do different text styles within the captions? Such as bold, italics, etc.? Thanks for the great work.

    - Glenn

  327. jasperguy Apr 15th, 2006

    #314 Scot – Thanks scot, easy mod.

    #321 Paresh – How did you get the prev / next to the top of the image?
    nevermind you answered here: #305.

    Thanks Paresh, I think I’ll be satified with the prev / next at a different location at this time, until I can get it to the captions area.

    #310 Eddie, I thought I had it wrong too, but it was the relative url to your image. Check the CSS carefully.

    #324 Son! – did you name all the images in the same set the same? ie: rel=”lightbox[baldhills]”

  328. Pixie - Incorporate Into eBay? Apr 15th, 2006

    Hi Guys.. Anyone Know how to get this to work with ebay?

    Ebay does not allow some javascript commands. i get this error / warning when I create the listing.

    Your listing cannot contain javascript (“.cookie”, “cookie(“, “replace(“, IFRAME, META, or includes), cookies or base href.

    Any help is appreciated.. My AIM Nick is MagicPixels2004.
    Any Help is appreciated.

  329. kimonostereo Apr 16th, 2006

    Nevermind,
    I figured it out! It doesn’t work if I have Amazon.com’s beta code for roll overs! DOH. sorry for the trouble! Thanks for a great script!

  330. Jon Apr 16th, 2006

    i’m trying to get the lightbox to go to the top of the page, with no margin-top. the css specifies position:absolute and top: 0px, but it still has about 50px or so above it. anyone have any ideas? thanks!

  331. Jon Apr 16th, 2006

    forgot to add… the body is set to padding:0px and margin:0px

  332. Koka Apr 16th, 2006

    @lokesh:
    a question: why are there two image files:
    close.gif AND closelabel.gif
    ?

  333. TheHYPO Apr 16th, 2006

    I have 3 minor issues with the script. On certain images (I have no idea what is special about those images) the caption box ’snaps’ a (maybe half a dozen pixels) wider after ‘dropping down’ at the proper width (this occurs with your script right out of the box, without and adjustments to the code or css).

    Secondly, the script won’t show ‘&’ characters in the caption (if if & is used).

    I changed the ‘close’ image to something smaller, and changed the css width for that div, but the new image is resized to 66×22 (the original close image size). I can’t find any reference to those dimensions in any of the scripts, so is there a way I could get that to display properly?

  334. Talguy Apr 16th, 2006

    #263 thansk alot I know you posted that a while ago but I haven’t been on a lot. That was a stupid error and after I changed the path it worked fine, Thanks again.

  335. TheHYPO Apr 16th, 2006

    Re: my last entry –
    - I solved the ’snapping’ issue.
    - Apparently the issue with the ‘close’ button resize is not an issue in Moz… just in IE (6 is what I’m using). I’m not sure why IE is sticking with 66×22px
    - I haven’t been able to solve the ‘&’ problem. Any thoughts?

    you can check my setup
    http://www.rockitoldschool.com/overl/gearinfo.php?gear=1

  336. TheHYPO Apr 16th, 2006

    D’oh. I feel like a jerk but I ’solved’ the close-image issue too (I didn’t do anything, it’s just working all of a sudden – I think it might have been cache-related or something.

    So now I’m down to the ‘&’ issue

  337. tg Apr 16th, 2006

    #337, hyp

    check this list for “&”

    http://www.ramsch.org/martin/uni/fmi-hp/iso8859-1.html

  338. Andrea Apr 17th, 2006

    Version 2.02 now works just find in Firefox 1.5.0.2 on a Mac under OS X Tiger. I upgraded FF today from 1.5.0.1 to 1.5.0.2 and now all is well with the latest lightbox.

  339. Johnnie Apr 17th, 2006

    I loved Lightbox JS and immediately implenmented it to my blogspot @ blogger – I came here to see the new version which haas great features I would like to use but for some reason cannot implement this v2.02 to blogspot.

    Doesn’t like the title=”" tag.. has anyone been able to implement v2.02 to blogger.. please let me know. Thanks.

  340. nonagon Apr 17th, 2006

    Check out this image gallery which uses Lightbox 2.02. Thanks Lokesh; it works perfectly!

    http://www.washingtonocg.org/towson2006/gallery.htm

  341. Garrett Apr 17th, 2006

    Geocities Issue:

    I have a free geocities site that I display pictures on. All of my other javascript works fine, but LightBox doesnt seem to work. It works offline however so it is setup correctly I believe. When I click an image it appears to want to work for a second by showing the loading gif but then opens the picture in a separate window. Any advice???

  342. Garrett Apr 17th, 2006

    I should have originally posted the site to show the issue Im trying to describe… its http://www.geocities.com/garrett_burnell/engpics.html . Sorry

  343. Sjon Hortensius Apr 17th, 2006

    When you have resized your body (like I did) IE will incorrectly think your ‘100%-width’-overlay and ‘100%-width’-lightbox are that resized body size.

    You can fix that by changing the width’s for IE to the following:

    #lightbox{
    width: expression(document.documentElement.clientWidth + “px”);

    }

    #overlay{

    width: expression(document.documentElement.clientWidth + “px”);

    }

  344. celia chen Apr 17th, 2006

    can this be used in MSN blog?
    i tried on mine, but from the header part,i failed.
    please reply me with a email, and i will be very appriciated thanks a lot

  345. Rene Apr 17th, 2006

    Hello, Im using the wp-plugin for lightbox..I figured out that it works..(Hooray!) but NOT when i activate another plugin that i use: EditorMonkey (WYSIWYG-editor)…How do I manage to get them both working…Don’t have a clue what EditorMonkey is causing wich fails to load the lightbox feature….Can anyone help?

    (my blog is: http://brokenbinary.org/freakatwork/)

    Greetz,
    Rene

  346. Li-An Apr 18th, 2006

    Hello, it’s a great work but I’ve got a similar problem than Rene. I use the Dotclear plugin (see #317) and Lightbox blocks my phpMyvistes http://www.phpmyvisites.net/index.php?part=accueil&lg=en javascript code (when I delete the Lightbox code lines, phpMyvistes works again). Somebody to help me ?

    Another strange problem: as I’m french, I changed the “n” shortcut for “next” with “s” for “suivant” (next in french) but it does not work (I changed “c” for “close” with “f” for “fermer” and I have no problem with this).

  347. Onedots Apr 18th, 2006

    Hi, mine doesn’t work at all after following all the steps. It just shows the title text and when I click it, the image comes out on another page. Can someboday help me?
    This is my sample page

  348. St3phan Apr 18th, 2006

    Is it possible to make the navigation always visible? If possible, could anyone point me in the right direction on how to do this?

  349. charlie-imac Apr 18th, 2006

    Question, if you look at this page – http://63.134.238.55/seasonHints/seasonHints.html you will see that I am using javascript to load each “page” into a div.

    Now, if you look at this page you will see that I’m using Lightbox but I would also like to use the other javascript to load each of the pages into a div for Annuals Perennials Trees Shrubs.

    http://63.134.238.55/plantDatabaseImages/annualsPlantDatabase.html

    Anyway to do this? I have three other sites, one for another landscape designer, one for a pet photographer, and the other for a people photographer. I like the javascript more than flash.

    I would appreciate any help.

    charlie-imac

  350. Fabrizio Calderan Apr 18th, 2006

    Why not create also a light/packed/compressed version of javascript code?

    I think you could reduce it until 50/60 Kb and maybe less. By the way this is a very nice script… great!

    Fab

  351. Garrett Apr 18th, 2006

    CHARLIE IMAC:
    Excuse the caps, its just to get your attention. I was looking at a script from dynamicdrive.com (http://dynamicdrive.com/dynamicindex4/photoalbum.htm ) and came across something that looked similar to what you are currently using (the page that uses javascript to load a new “page” into a div). I was wondering if you might be able to fix your problem by tweaking the given code to insert a ‘rel’ tag for the images (in the arrays framework), thus allowing you to also use Lightbox. I am by no means a javascript person, but saw this and was wondering if it might be helpful.

    Garrett

  352. Paul Apr 18th, 2006

    #349 charlie-imac:

    Refer to #143, thanks to Vladimir.

    #143 Vladimir
    April 1, 2006 @ 5:43 pm
    to #132: after you change the innerHTML of a div, run initLightbox()

    I think that you are having the same problem I was having… hope it helps.

  353. Big Al Apr 18th, 2006

    Sorry to be a noob, but how can I insert a line break before a link in the caption (in Firefox)? I’ve seen Lokesh’s notes: Image

    In my title, I’m picking up a variable (comments up to several sentences long) as follows: title=”$variable <a…as above” This is working well in IE, but Firefox is displaying and my link info.

    Otherwise, this is fabulous, thank you for sharing.

  354. Big Al Apr 18th, 2006

    Brilliant. sorry about the “image” link above. Lokesh provides a way to add a link in the caption: http://www.lokeshdhakar.com/projects/lightbox2/

    I just want a line break (I did try & # 6 0 ; etc., but that didn’t seem to work).

  355. Da Scritch Apr 18th, 2006

    I looooooooove thoses functions but, as I wrote it there in French http://dascritch.net/blog.php/2006/04/19/381-lightbox-v20-trop-joli , they are just too clean for not having problems.
    I translate here my “buglist”;

    1- not easy to localise “Image # of #” except if you can read the code
    2- Can’t accelerate^W unactivate the animations
    3- No URL bookmarkable for the galleries
    4- Neiher for the image in the gallery context
    6- Can’t switch to fullscreen, outside gallery context
    7- No resize of the picture if too large/tall for the viewport
    8- Comments are at the bottom (th hardest to modify IMHO)
    9- Unavaila^W Available shortkeys not evident for non English speakers
    10 – too much javascript (but I will modify my website, so i’ll reduce them)

    see the page for more details

  356. Christian Apr 18th, 2006

    Great app, but the closelabel and loading images doesn’t show up on every page because of the relative image adress used by lightbox. Which of course is plain stupid! Coders, what were you thinking?! We all have blogs nowadays with individual pages, front pages, archives etc all with different folder-structures. Then relative paths does NOT WORK!

    Please fix this!

  357. turk Apr 18th, 2006

    ok here is something i really want. a way to invoke the lightbox from a link so if i want to link to my gallery and have an image pop up in the lightbox auto.
    like if my link is
    http://www.turk-182.com/eMortal/index.php?section=album&a=11&f=IMG_6215.jpg

    it will load the page and then invoke the lightbox to show IMG_6215.jpg
    anyone have any ideas ?
    i cant seem to figure an easy way to do it.

  358. Isaias Loaiza Apr 18th, 2006

    Hi man!!!, fisrt of all i want to say congratulation for your script, its fantastic… really

    i am using it in my blog (www.isaiasloaiza.com) and i am trying to custumize on thing…

    in an ‘image set’ is there a way to change the text “Image 2 of 2″ for “Imagen 2 de 2′

    I want to put it in spanish because my blog is in spanish…

    Can you help me? in what page or code do i need to enter?

    THANKS FOR YOUR HELP!!!!

  359. Richad Apr 19th, 2006

    Kudos. Yeah it has some shortcomings but the slide show is an excellent addition to the original concept. You allowed me to remove a number of separarate photo pages. Keeping the visitor “in-line” on one page is cruicial to a pleasant viewing experiece. THANK YOU!.

    Now that I’ve stroked you, :-) here’s my requests for the next version. Both are imo very important.

    IMAGE RESIZING on the fly
    Put a 2nd variable in the REL attribute: size expressed either in pixels or percent. eg [width:640px] or [width:50%] or [height:740px] or [height:50%]

    Only need to specify width or height, not both (proportional resize). This is needed because often the same image is used on more than one page but at different sizes.

    NAVIGATION
    A commentor above was rather harsh. I used to code so I know things sometimes turn out awkward in the heat of the battle. So no dings from me. Just a request to clean it up.

    Don’t think the hover is a good idea. Not intuitive or explicit. So what I’d like at bottom of photo is:

    Caption on first line by itself.

    2nd line with:
    * Image n of n DIV (float left)
    * navDiv (float right)
    ***navPrevious link
    ***navNext link
    ***navClose link

    Each nav link having a background image (easy to change)

  360. Garrett Apr 19th, 2006

    Geocities issue:
    I’ve looked all around (the code and the net) and cant find a solution to why LightBox wont work on my Geocities site. Sorry to post this again (its the last time I will bring it up), but can anyone tell me what might be the problem. here is the page with the issue

    http://www.geocities.com/garrett_burnell/engpics.html

    Thanks for any help

  361. Koka Apr 19th, 2006

    hm, these brackets [, ] aren’t allowed in xhtml1.1

  362. Koka Apr 19th, 2006

    … in the
    rel=”lightbox[roadtrip]”
    attribute

  363. Christian Apr 19th, 2006

    Hi,
    Good work!
    Would it be possible to incude the maximize feature in 2.02 as it is in Lightbox Plus?

    Christian

  364. m0n Apr 19th, 2006

    everything is working fine for me except no captions for titles are showing.
    any ideas?

  365. Scott Apr 19th, 2006

    I normally don’t like to be mean, but #356; dude, fix it yourself! I don’t see anything that needs to be fixed by the developer … just change out the realtive links for hard coded links.

  366. iLYA Apr 20th, 2006

    function getPageSize() in IE|Win|6 appear to report the width correctly only if the margins of the page body are set to 0. It’s noticeable, when the overlay has different color than the page background, so in order to add some space to page contents, one has to add a wrapper div to apply the desired margins to it. Not a biggie, excellent work otherwise!

  367. Michael Apr 20th, 2006

    Can I show multiple images in 2.0 by using only 1 image or do I need to show all the images on the page as thumbnails.

    I am trying to get away from showing a lot of thumbnails.

    Example:
    http://www.digitalcameratracker.com/archives/2006/04/18/hp-photosmart-r927-sample-pictures.html

    It would be great to have one image and once clicked then the other images would be included in the slideshow.

    Is it possible?

  368. Los Apr 20th, 2006

    Wow, you seriously need forums! :D

  369. Dan Apr 20th, 2006

    Agreed^ :)

  370. Dustin Apr 20th, 2006

    Is it possible to have the ‘next’ and ‘previous’ buttons shown at all times? Or is there an easy way for me to move them to the bottom of the image window?

    Our company looked into using your script on a few sites, but found that without this modification, it would be better to pass(for now)…

    Thanks, and great work!

  371. Steven Roussey Apr 20th, 2006

    It would be great if it limited itself to the size of the window. Accidentally using a large image screws it all up! Great script!

  372. Eduo Apr 20th, 2006

    (Wow, whatever broke the format for the comments makes clicking in the “name” field try to load a JPG. Ugly. Maybe closing the tag (… …)

    Now, my comments.

    First of all, Lightbox is fantastic and I secretly thank for it having only a single uppercase letter, I can imagine you forcing yourself not to do the trendy LightBox thingy :)

    Now, I had entered to ask about how to reload lightbox when divs are added through XHR, but that’s been answered already. I also wanted to ask about links working as images do for images, but that’s been done as well (and it works, I tried, stupid me).

    Something I haven’t been able to make work is using empty links to show other images in the slideshow without having to show visible links but I haven’t been able to.

    Dustin: The comments already mention the obvious way to do part of what you want. Just check the hover section of the CSS, as the arrows are affected by it.

  373. eduo Apr 20th, 2006

    Ah. And now I see the multiple link thing works. Fantastic.

  374. Justin Apr 20th, 2006

    I posted before as #304, and I still haven’t quite figured it out. My problem has to do with the Loading and Close GIF images. I did follow the advice given by #288, but it has not worked. It seems to me that the close button GIF is located too far up?

    Any help is appreciated. You can see it running on my site at http://www.designdraft.net/?page_id=31 . Thanks a lot.

  375. Massimiliano Marcon Apr 21st, 2006

    There is a bug with konqueror…background become black.

  376. Kev Charlton Apr 21st, 2006

    I’m having a problem displaying gifs in the gallery. In IE when the gif loops it refreshes the caption animation at the bottom, and often crashes. Is there a way round this or can i just use static imagery?

    http://resource.mediabuzzmail.co.uk/themediabuzz_new/portfolio.html

    (check the one with the gorilla on)

  377. Kristine Apr 21st, 2006

    @ #367
    You wrote:
    > Can I show multiple images in 2.0 by using only 1
    > image or do I need to show all the images on the page as
    > thumbnails.

    Yes, it is possible. You only have to show the first thumbnail. Like this:




    But I don’t know, if there are errors in some browsers with the empty links! I only tried quick an dirty. ;-)

  378. Kristine Apr 21st, 2006

    Oops,

    no code.

    I try another way:

    @#367:
    You have write:
    Link to pic1 – thumb1 – end link
    link to pic2 – end link
    link to pic3 – end link

    So will only see thumb1, but the gallery will show all pictures.

  379. andre Apr 21st, 2006

    Runtime error seen in windows 2000 (not seen on other windows xp computers). V2.02

    1) Line 87 error ‘Element’ is undefined.
    2) Line 129 Object required.

    If I run Debug, it points me to lightbox.js. I don’t see this on the client side when testing the webpage, nor on multiple PCs running winXP. Any ideas?

  380. Chris R. Apr 21st, 2006

    I can’t get the opacity of the background to change, is it necessary to change other values next to the three opacity rules in the #overlay declaration in the CSS?

  381. Chris R. Apr 21st, 2006

    Found it :)
    On line 320 in lightbox.js you can change the values, CSS doesn’t matter in this case i guess :p

  382. Magnus Apr 21st, 2006

    thanks lokesh, wonderful script. will be using it on a new site i’m working on, http://www.re-treat.org and will make a donation when i have some spare cash

  383. Tom Apr 22nd, 2006

    Hi!

    Could someone help me with my problem?

    My wesite is http://www.bionicbabies.net and you can find the site where i used lightbox here: http://www.bionicbabies.net/index.php?%20site=fotos20041016 .

    I just used it for the first picture for the time. The problem is: Lightbox pops up, but underneath my site. First the overlay graphic, then the picture.

    I spent the last 2 hours coming that far, but i simply don’t know what to do next.

    I’d appreciate your help very much. Once it works i’ll compliment on the it :)

  384. df Apr 22nd, 2006

    dfg

  385. Jessica Apr 22nd, 2006

    hello, lightbox is great! i’m trying to get the images fixed to the top of the page, with no margin-top. can someone help me telling me how to do this.

  386. Vinoo Samuel Apr 22nd, 2006

    Lightbox rocks. Just installed it on my website showcasing my one month road trip to the Himalayas, and you can’t imagine what a brilliant difference it has made to the site’s look and feel. Thanks Lokesh. I have credited you on the home page too.

    http://blog.vinoosamuel.com/himalayas/

  387. paul Apr 22nd, 2006

    this is perfect for band photo galleries. in fact, i just implemented on my new band site, thanks!

  388. Brent Vermilyea Apr 23rd, 2006

    The lightbox script is awesome! Thank you very much! When I setup my own online gallery I’ll be making some donations. Feel free to check out my photoblog that uses your script at http://adistortedperspective.blogspot.com/

    Cheers!

  389. Richard Apr 23rd, 2006

    I also need the ability to display other data besides images. Lightbox Gone Wild is overkill for me but Leightbox is simple and fills the bill nicely and is very small. I now use both LB js and Leightbox.

    http://blog.eight.nl/articles/2006/02/21/fire-lightbox

    They coexist fine if you:
    Change script name from lightbox.js to leightbox.js (or whatever).
    Eliminate conlict: change occurences of class lightbox in css and your html to leightbox.

    Leightbox is really small and uses the same prototype so maybe using inline div’s will be added to Lightbox js in the future to simplify things for us.

    See example at http://www.oldguy.us/tpo click the “Read about” link in 2nd paragraph. Further down the page I have some Lightbox js thumbnails.

    Hey…while you’re there take a look at the Driver Awareness flyer. Click on the link “1. the “straight” version ” or just go to http://www.oldguy.us/tpo/lfus-flyer1.html

  390. Kieran Apr 23rd, 2006

    Hey guys!

    So far i’ve modified lightbox to run on demand, and i’ve also got it working correctly when my divs are reloaded within the page – except the image doesn’t show up!

    check this out – http://www.picturegrid.net/index.php

    you can see it must be loading the image because it resizes…. but then it doesn’t show it!

  391. Travis Schmeisser Apr 23rd, 2006

    Is there a way to completely fade the background to black?

    I tried changing the #overlay styles to:

    filter:alpha(opacity=100);
    -moz-opacity: 1;
    opacity: 1;

    Am I missing something?

  392. John Fielden Apr 23rd, 2006

    #383 Tom

    Your lightbox.css is jacked up. You’re missing the majority of the file. Download it again and install over yours.

  393. Tom Apr 24th, 2006

    Thanks John, will try it and post if it worked.

  394. SoulCreeper Apr 24th, 2006

    i just implemented that lightbox objects to a webpage, but it doesnt seem to work properly. in fact, it’s not working at all :S
    can someone please take a look at it, because it’s really driving me mad just because i cant find the problem. \
    i guess it’s just the most simple problem ever, but i’m just overlooking it. i dont know …
    here’s the webpage:
    http://www.goudenkust.nl/nl/mj_inh_algemeen.htm

  395. Danne Apr 24th, 2006

    I got the file to show a flash file (.swf file) but i need to get the name of the file dynamic… grr…

  396. Erik Apr 24th, 2006

    Is there something inherent about tiff’s that would prevent them from working properly with Lightbox? I’m investigating using this as a means to display tiffs for a lab notebook webapp I want to put together. When I tried doing this with XP and IE6 it just continually spins the progress indicator.

  397. Andrew Apr 24th, 2006

    This is great been using the old version for (well since it was released basically), anyway needed to put up some photos for a wedding and lightbox seems like the best idea for that. However some of the photos are quite large (2560 wide etc..) and Id like to offer bigger photos to viewers who have the bandwidth. Anyway there is an issue if the image is larger that the current browser view port that the overlay doesn’t resize as noted by Mark L and Rom S somwhere above… This is the code I used to resolve this issue. Note that the resizeOverlay function should be called as part of the afterFinish literal in showImage.

    resizeOverlay: function() {
    // Make sure the overlay actually covers all the page dimenions
    var arrayPageSize = getPageSize();
    var wCur = Element.getWidth(‘outerImageContainer’);
    Element.setHeight(‘overlay’, arrayPageSize[1] + (arrayPageSize[3] / 15));
    Element.setWidth(‘overlay’, (arrayPageSize[0] > wCur ? arrayPageSize[0] : wCur));
    },

  398. smac Apr 24th, 2006

    Great script! I love it.
    I did have a conflict however. I’m also using the xfade image crossfader script by Kevin Smith (http://slayeroffice.com/code/imageCrossFade/xfade2.html).
    It turns out, both scripts make use of an “imageContainer” div. It took me a while to figure out why nothing was showing up right!
    A (picky) suggestion would be not to use “generic” names like “imageContainer” that could easily crop up elsewhere and cause conflicts. It would be just as easy to use e.g., “lbimageContainer” and reduce the chance of conflicts.

    You can see both scripts in action at:
    http://www.placewiki.com
    (although the lightbox is only used on “place” pages that have more than one picture, like this one: http://www.placewiki.com/viewplace_detail.php?placeID=47

    Thanks!
    Steve

  399. Nick (Australia) Apr 24th, 2006

    subjet: Lightbox working before entire page loads

    Hello,

    Has anyone had any success with adding something that will alow the lightbox to work without the page having fully loaded. Lightbox is such a great feature it seems a waste to not have it working from first click if the page hasn’t fully loaded.

    I know Lokesh is keeping it as an unobtrusive feature as an onload function but on my site I want obtrusive – I don’t want this thing not to work if I have eager mouse clicker trigger finger site visitors who don’t want to wait for all thumbs etc to download before they can see the great lightbox gallery. They just see the link on a new page in the same window – which makes it look worse than plain html galleries.

    I think this is an important issure.

    I have tried following advice from entry “#161 from anthonyjhicks” but have just not had any luck with that.

    Please help.

    Thank you kindly.

  400. Lokesh Apr 25th, 2006

    #370 Dustin – If you want to keep the ‘next’ and ‘previous’ buttons visible, comment out these lines as follows in the lightbox.js file:
    // Element.hide(‘hoverNav’);
    // Element.hide(‘prevLink’);
    // Element.hide(‘nextLink’);

    Also, update the lightbox.css so the ‘prev’ and ‘next’ images are visible always and not only on hover. Let me know if you need specifics here.

    #385 Jessica – If you want to get rid of the top margin, open up lightbox.js in a text editor. Change: Element.setTop(‘lightbox’, lightboxTop); to Element.setTop(‘lightbox’, 0);

    #391 Travis – If you want to adjust the opacity of the overlay open the lightbox.js file and tinker around with this line:
    new Effect.Appear(‘overlay’, { duration: 0.2, from: 0.0, to: 0.8 });

    #398 smac – Good point. With a wide-open namespace, generic id names like “imageContainer” are a bad idea. I should probably prepend them with a consistent prefix.

    I will be addressing more comments as I get time this week, so just hang tight. As for feature requests, I have no plans to extend the script much further at the moment. Its a time thing. I will probably release a minor update with some tweaks soon. But do feel free to open up the code and add/edit/hack it up yourself. Thanks everyone.

  401. macx Apr 25th, 2006

    It should be possible to localize the text “Image x of x”" via config-commands.
    Also you should add the keys “arrow right” and “arrow left” to navigate. Following works on PC and Mac: if((key == ‘p’) || (key == ‘%’)) and if((key == ‘n’) || (key == “\’”)).
    Could you please add the stuff?

  402. Triall Apr 25th, 2006

    ?????? ???? ???????

  403. Andy Stones Apr 25th, 2006

    Legend

  404. ShadowKris Apr 25th, 2006

    I love Lightbox 2.0 !!!

    That’s a very nice work !!!

    Congratulations :)

  405. SoulCreeper Apr 26th, 2006

    okay, here’s another request from me in addition to an earlier request i posted this week somewhere above.

    is there a way that the close button (“X”) can be put in the bottom right corner of the picture that’s linked to? so that it doesnt slide out from under the picture but onto the picture’s bottom right corner.
    In fact i want to have the close button in the same way put onto the picture as it was in the previous version of Lightbox.

    i tried looking into the JS file, but because i’m not such a JS expert on that area i’m just requesting the issue here.

    help would be greatly appreciated :D

  406. sander Apr 26th, 2006

    have not implemented it (yet), but it looks like a true gem, well done!

  407. Hensel Apr 26th, 2006

    Hi, i have a problem.
    I´ve benn installing the script lightbox on a site. but the style is wrong its look like quirly !

    Please take a look and tell me was is wrong !

    thx

  408. Hensel Apr 26th, 2006

    Here is a link to a picture that show you the problem

  409. Hensel Apr 26th, 2006

    Pic

  410. Soyuzno Apr 26th, 2006

    I’ve try this, and works perfect. Well done :)

    Is it posible if visitors want to print the image? I mean is it posible to add a print button or something?

    Anyway, once again..well done!

  411. Ståle Raknes Apr 26th, 2006

    Very nice work !!!

    Here is a tip to everyone :)

    Fix Lightbox JS for Opera.

    Add this to your css file:
    @media all and (min-width:0px){
    #overlay{
    background: url(../images/overlay.png);
    }
    }

    Then create a 1px png with 60% opacity on a black layer, save it in the image folder as overlay.png

    Happy coding :)

    Ståle

  412. nick Apr 26th, 2006

    does anyone know, why lightbox doesn’t work on my site?

    http://flickr4j.nborn.ch

    the small pictures in the upper left should be displayed with lightbox…

  413. Gibbo McCool Apr 26th, 2006

    Well done with version 2 !

    For those attempting to use an imagemap ( image map ) with related images make sure you find the Both lines of
    var anchors = document.getElementsByTagName(‘a’);
    and change the ‘a’ to ‘area’ ( as mentioned on the original lightbox blog #140 ). Their on lines 172 and 326

    thanks for the script Lokesh :)

  414. Kaz Apr 26th, 2006

    Lightbox iFrame Fix..
    No!! lightbox.js adjustments needed ;-)

    [1] In your iFrame page add the following
    Display LightBox

    [2] Adjust the values in the form to represent your url and title..

    [3] In your parent page which contains the iFrame add the following along with the standard Lightbox calls..

    function lBiFrame(obj) { //Create the function for your onclick event in your link…
    var iframe = window.frames['pmf']; //this has to be the name of your iframe.
    var iframeForm = iframe.document.lBiFrame_form; //this has to be the name of your frame and your form.
    var hrefvalue = iframeForm.LightBox_iFrame_imgUrl.value; //this has to be the name of your “Image URL” hidden field.
    var titlevalue = iframeForm.LightBox_iFrame_imgTitle.value; //this has to be the name of your “Image Title” hidden field.
    var simulated_iFrameLink = document.createElement(‘a’); //Creates a href object
    simulated_iFrameLink.setAttribute(‘href’, hrefvalue); //Sets the href object to your lightbox image.
    simulated_iFrameLink.setAttribute(‘title’, titlevalue); //Sets the title object to your lightbox image.
    simulated_iFrameLink.setAttribute(‘rel’, ‘lightbox’); //Sets rel href object to your lightbox image.
    //alert (‘href: ‘ + hrefvalue + “, Title: ” + titlevalue); //For debug, to test if href and title are passed correctly..
    myLightbox.start(simulated_iFrameLink); //Starts lightBox
    }

    [4] Make sure your sub frame had the correct name elements, mines called ‘pmf’ (name should do, but i set name, id and title just for backup) and change the source..

    [[[ 5 ]]] If all fails, here’s the full demo code..

    ——– Save below as ‘index.html’ ——–

    function lBiFrame(obj) { //Create the function for your onclick event in your link…
    var iframe = window.frames['pmf']; //this has to be the name of your iframe.
    var iframeForm = iframe.document.lBiFrame_form; //this has to be the name of your frame and your form.
    var hrefvalue = iframeForm.LightBox_iFrame_imgUrl.value; //this has to be the name of your “Image URL” hidden field.
    var titlevalue = iframeForm.LightBox_iFrame_imgTitle.value; //this has to be the name of your “Image Title” hidden field.
    var simulated_iFrameLink = document.createElement(‘a’); //Creates a href object
    simulated_iFrameLink.setAttribute(‘href’, hrefvalue); //Sets the href object to your lightbox image.
    simulated_iFrameLink.setAttribute(‘title’, titlevalue); //Sets the title object to your lightbox image.
    simulated_iFrameLink.setAttribute(‘rel’, ‘lightbox’); //Sets rel href object to your lightbox image.
    //alert (‘href: ‘ + hrefvalue + “, Title: ” + titlevalue); //For debug, to test if href and title are passed correctly..
    myLightbox.start(simulated_iFrameLink); //Starts lightBox
    }

    ——– Save below as ‘LB_iframe.html’ ——–
    Display LightBox

    ————————————————–
    Credits to Sean K for his example that i adjusted (http://www.lokeshdhakar.com/2006/03/29/lightbox-v20/#comment-2235)

    Nb. sorry for long posy ;-)

  415. Nick Toye Apr 26th, 2006

    Ok, has anyone had any success moving the prev and next buttons to the bottom area or image data container.

    Alternatively, how do I add the text – “Press N to move forward and P to move back?

  416. Kaz Apr 26th, 2006

    Lightbox iFrame Fix..

    Hmm.. Some of the code didn’t render well in the post, so zipped the whole working demo and posted it at the link below, hope this helps..

    http://www.kharsim.com/LightBox2_iFrameFix.zip

    Kaz

  417. Nick Toye Apr 26th, 2006

    My god, this should be in a forum, I don’t know who’s answering who.

  418. noname Apr 26th, 2006

    Nice script you have done her! But i wondering about can`t i make a folder and put all my picture in there and make a glideshow from this folder. And not to make a link to them all?

  419. John Fielden Apr 26th, 2006

    #415 Nick Toye
    For your first questions, take a look at post #400 by Lokesh himself. If that’s not what you’re looking for, try posts #242, #305 and #314.

    To add N and P key functionality, refer to posts #290, #323, and #401.

  420. Jason Tate Apr 26th, 2006

    Whomever figures out how to display .mov and .swf files, please post.

    Thanks!

  421. Malcolm Apr 26th, 2006

    I am trying to fix the same bug as #397 Andrew proposed a fix for, but I’m not having any luck. I pasted in his javascript as I thought, but it doesn’t seem to be working…. the shadow overlay still has rendering problems if the image is bigger then the window.

    My test is here if anyone wants to take a look: http://www.maljones.com/illo-treeoflife.html

    Has anyone clearly fixed this bug?

  422. Nik Apr 26th, 2006

    I’m having a scope problem with Lightbox. When I implement the solution in just a static page, it works fine. When I try to implement in my AJAX application, it doesnt. Basically what I do is I have a PHP which returns information on a client, based on a variable which is passed in through Ajax. The information is then bound to a DIV using the innerHTML. So anyway..in that HTML, there is a reference to an image that I’m trying to wrap the lightbox anchor around.

    Think of it like this:

    // where the lightbox stuff is defined

    So inside the container is where I have the block, and it’s having issues with the scope I believe. Anyone have ideas?

  423. Nik Apr 26th, 2006

    Ah, I’m sorry..parses out HTML I guess. What I meant to say is inside of the index.html, all of scripts and styles are defined at the top of the page, and there is a div container which is being filled with the data.

  424. KD Apr 27th, 2006

    Having an obvious problem in my page, the lightbox does not overlay on the Flash banner ad i have on the page. Also when I tried to shift the lightbox a few pixels down (top: 60px) it does’nt work. Can some1 help me out.

  425. nick Apr 27th, 2006

    is there nobody that can help me?

    again my previous comment:

    does anyone know, why lightbox doesn’t work on my site?

    http://flickr4j.nborn.ch

    the small pictures in the upper left should be displayed with lightbox…

  426. Chris Apr 27th, 2006

    Can lightbox be used to display html page? becasue I would love for it to act as somewhat as a pop up displaying a html page. or does it only display images?

  427. arden Apr 27th, 2006

    I’m relatively new to this so please bear with me if this seems like a basic question. I’m having trouble with the pictures opening on a new page (as noted on your web site it is a common javascript conflict). The part I’m having trouble with is finding the line ( aka the needed to patch. I don’t know where it is and haven’t been able to stumble upon it in the java scripts supplied. Could someone please direct me? This picture gallery looks like a great little piece of coding and I would love to encorporate it in the web sites I am involved with. Thanks in advance.

  428. Bozoman Apr 27th, 2006

    Cool thats awesome! Do you know how to add it to my Zoomshare site. (www.bozoman.zoomshare.com)

  429. Very Excited Apr 27th, 2006

    This is awesome!!

  430. Mahesh Apr 27th, 2006

    I have created a compressed/optimized version of the JS files. In total I’ve compressed the total size of the four .js files to 47 KB (about 50% smaller). Partly I’ve pruned all unused code from effects.js & prototype.js and then used an optimizer to remove whitespace & newlines.

    I also created a Picasa Export template to create photo galleries quickly from Picasa. I borrowed the look and feel of your lightbox2 project page for it. I also added a little feature, where while the thumbnails are downloading, it shows a overlay with “Loading” message. Because while the thumbnails are still downloading, the onload function has not been called yet, so Lightbox is not yet initialized. If the user clicks on any thumbnail, it will simply show them the regular image. The overlay covers the whole page and prevents any clicks. The overlay disappears once all thumbnails have finished loading and since partially opaque, the user can see the thumbnails getting downloaded.

    The Picasa template is available for download at : http://www.mahesh.net/lightbox/lightbox2_picasa_template.zip

    This zip also contains the optimized js files. I haven’t created a separate zip for it.

  431. Simon J Apr 27th, 2006

    ONLOAD WORKAROUND

    Has anyone found a working workaround to the unobtrusive onload function so that lightbox still works even while the page has not fully loaded?

    I tried implementing changes from #161 by anthonyjhicks but I think he was referring to lightbox 1 when he was commenting out addloadEvent in lightbox.js as I can’t find that reference there.

    This is something that help all lightbox users.

    Thanks in advance.

  432. Mahesh Apr 27th, 2006

    Simon,

    I have a solution. I would not call it a workaround and its very simple to implement. Look at the Picasa Template package in #430 above.

    In header.html
    There is a and some CSS for it in css\screen.css. There is a onload function to remove the overlay once the page has finished loading.

    In footer.html
    Just before you close the tag, there is a JavaScript block. It expands the overlay div all the way to the end of the page. This is when the page height is longer than the window height. Without this anyone can scroll the page, while other images are downloading and click away.

  433. York Apr 27th, 2006

    Lokesh, thanks for making Lightbox available; it’s a beautiful app. I’ve just made use of it at http://www.yorkrules.com/journal.

    I’d like use it to sell my photos by adding an image-specific “add to cart” button to the “imageData” area, using WebAssist.com’s PayPal eCommerce Toolkit extension for Dreamweaver 8. The HTML behind the “add to cart” button is actually a form, with a number of hidden inputs.

    Is it possible to add such an extension/form to the “imageData” area? If so, how?

    Thanks again,

    York

  434. Anton Apr 27th, 2006

    I’m using Lightbox without any problems and just have stumbled on an interesting error.
    When adding the new Sidebar Widget into wordpress and using some of its features Lightbox still works but not the way as intended. The picture just show on a new page in the browser. It happens in any browser and only when the sidebar widget is actually used.
    Maybe someone knows a solution to it
    thanks

  435. Richard Apr 28th, 2006

    re: #415 Nick

    “Ok, has anyone had any success moving the prev and next buttons to the bottom area or image data container.”

    Tried but failed.

    “Alternatively, how do I add the text – “Press N to move forward and P to move back?”

    Did it and hated it. (it’s an ugly, unfriendly solution). I finally got the NEXT/PREV buttons moved all the way to the top and always displayed. It makes a nice clean layout. Suggest you browse to this page on my site:

    http://www.oldguy.us/easy-riding/05-tl/

    Click on the “Slide Show” link under the top photo to view the results. If you like it then just grab lightbox.js and styleLightbox.css from your Firefox cache or IE’s temporary internet files folder.

  436. Richard Apr 28th, 2006

    ##426 Chris

    “Can lightbox be used to display html page?”

    No. Suggest you try Lightbox Gone Wild. It will do what you want.

    http://particletree.com/features/lightbox-gone-wild/

  437. Vini Apr 28th, 2006

    Can anyone shed any light on my problem, i click on a thumb, and the LB pops up, just ti doesnt do anything…

    http://www.vini.co.uk/gallery/index.php?level=album&id=83 is an example page.

  438. Simon J Apr 28th, 2006

    re#431 and 432

    Thank you kindly Mahesh. That is definitely an option. I’ve tested it and it works well across different browsers.

    I am hoping for an alternative to the onload rather than an overlay if possible. I will certainly use your method if I dont come across a working onload alternative.

    Might as well re add my request: Has anyone found a working workaround to the unobtrusive onload function so that lightbox still works even while the page has not fully loaded?

    Thanks for that.

  439. Harmunt Apr 28th, 2006

    Excellent product!

    I use this facility with great success on my blog to display JPEG images and I was extremely pleased to discover it’s merits in displaying animated GIFs.

    However once I try SWF Flash files the lightbox activates but displays nothing… Is it actually compatible/designed to display flash files or am I expecting too much from the software? :)

  440. anouke Apr 28th, 2006

    I’m using this script for a small gallery linked from my blog but it doesn’t work correctly. It only shows three of the nineteen photographs and I don’t know why and everything (archives and scripts) is in the right place :(

    Please take a look here:
    http://anouke.spymac.com/fotografies_lightbox/index001.html

    All the comments and responses will be really appreciated. Thank you very much! :)

  441. pkruegel Apr 28th, 2006

    Awesome Tool.

    Though stumbled across a small problem. I am sending my blog entries to an iframe and therefor lightbox wont expand beyond the size of that iframe. Is there any kind of advice how to fix that? Adding _top to the picture links won’t do it i suppose, couldnt get it to work to be honest there.

    Any help would be greatly appreciated.

    thanks a lot and regards.

  442. Mahesh Apr 28th, 2006

    Re: #438

    Simon,

    One possible solution is to disable the last line in lightbox.js
    Event.observe(window,’load’,initLightbox,false);

    and in your HTML, stick this just before the end of the <body> tag within script tags

    initLightbox()

    It seems to work but I couldn’t really try it, since I am sitting on a very fast connection and thumbnails load quickly. I’ve implemented this here
    http://mahesh.net/lightbox/sample_gallery3

    Try it and let me know if it works.

  443. 1madff Apr 28th, 2006

    Great tool, for the lay people, do you have any way of making it generate the html, so we can just copy and paste it to a webpage, because I am way lost, I tried to do it myself…..sadly i failed!!

  444. 1madff Apr 28th, 2006

    Never mind I just figured out what I did wrong!!

  445. Tim Apr 28th, 2006

    Awesome resource. Rock on!

  446. arian Apr 29th, 2006

    awesome, using it for travel galleries:

    http://www.ar1an.com/china/gallery/

  447. arun Apr 29th, 2006

    Awesome script!

    I tried it (both versions) on Opera 7.54 – the first time it works great. but if we click on the same thumbnail again, I can see only the loading graphic..the pic doesnt appear. Can someone tell me, please, if there is a fix for this.
    Also , Lightbox v1 works on IE5.5 but v2 fails (ie., images open in another window)
    Kindly help. Thanks.

  448. Vinoo Samuel Apr 29th, 2006

    Just finished a website of my one month road trip to the Himalayas using Lightbox, and it rocks.

    Check it out at http://blog.vinoosamuel.com/himalayas/ and let me know your comments…

  449. Vini Apr 29th, 2006

    #440 anouke

    im having the same problem.

    http://www.vini.co.uk/gallery/index.php?level=album&id=86

  450. Pierce Apr 29th, 2006

    I’m interested in using Lightbox JS for the photblog that I have yet to create. I want to use Lightbox JS to display my daily images (as well as utilize its navigation system to browse through past pictures), as opposed to having multiple thumbnails and forcing a user to click on one to have it enlarged and only THEN being able to use the LB navigation to browse through the pictures. So basically, I want a typical photoblog setup, integrated with the smooth transitions of LB. I hope I’ve explained this clear enough for most to understand; I’d like to know if this is possible? If so, are there any existing examples on the internet? Thanks in advance.

  451. badstyle Apr 29th, 2006

    none of this is working for me, I’m pulling in the content of a gallery page from an . However the page that the include sits in is top level of site.

    I’ve made sure all the relivant folders that are need for lightbox sit on the same top level as the page that contains the include, and there are no onLoad’s in the . The head contains all relivant links to .js and .css files. Still nothing is working at all.

    Upon clicking the thumbnail – the desired image opens, but only as a direct link to the image and not via the lightbox feature. Bizzare.

    Any other pointers I should check out? Sorry no links, working on testing server.

  452. Bob S. Apr 29th, 2006

    i’m not sure what i’m doing wrong, but Lightbox doesnt seem to be working properly, needless to say, i’m not very good with computers, but i’m pretty sure i did the html part right.

    can anyone give me detailed instructions on how i install Lightbox 2.0 ?

  453. T.J. Apr 30th, 2006

    I REALLY love Lightbox 2.0. It is almost everything I am looking for. It is great to include captions. I was wondering if one thing is possible though…

    I would like to have a title for each of my photos in addition to a caption. I was wondering if this is possible. Here’s what I’m thinking – the title attribute in the link reference is the caption – maybe the alt attribute in the image source could be the title? So if my title=”blah, blah, blah” and my alt=”The Blah Picture” it could look like:

    [Picture Here]
    The Blah Picture
    blah, blah, blah X Close

    If I could code I’d do it myself, but alas I’m a moron when it comes to that.

    Also, for windows users, it it possible to get rid of the image options that appear over images in IE?

  454. Simon J Apr 30th, 2006

    Re: #442

    Hi Mahresh,

    Thanks for that. Sensational. Thats what I’m after.

    Works in IE6, Opera 8 and Firefox 1.5.

    Doesn’t work in Netscape 6 (it operates as per normal if the page has not fully loaded) – but hey – who uses that anyway?

    I tried it with a very slow loading gif on a test page and it works a treat.
    http://theinstamatics.com/bandmembers/n16.htm

    Thank you kindly Mahresh – you are the absolute greatest!!

  455. Simon J Apr 30th, 2006

    OPERA FIX

    Hello, the transparency overlay is not working for me in Opera 8. I have tried the tip presented in #411 but have not got anywhere with that.

    Has anyone got a fix for transparency of the overlay in Opera?

    Thanking you.

  456. stifler Apr 30th, 2006

    THIS IS AWESOME!

  457. Syed V Apr 30th, 2006

    Man… you are amazing!
    I’ve been trying to find a good way to display images on my website and since I’m new to this, I spent a long time searching for a perfect script and I swear I found it!

    Thank you!!!

  458. Bob S Apr 30th, 2006

    do i need to upload any files for Lightbox 2 to work?

  459. badstyle Apr 30th, 2006

    ok right this is great yeah, if only it would work.

    I’ve worked in commercial web design for about 5 years now, primaraly as a designer and on the side line as a low level developer, yet I can’t get this to work on my testing server at all.

    It makes no sense, as the source files I’ve downloaded with the sample works fine, and no matter how many times I replicate it and the folder heirachy on my testing server it just doesn’t work, is this a known bug for this IIS or something? Anybody else out there who can’t actually get it to function at all?

  460. Vini Apr 30th, 2006

    Bob, yes you do, you need to upload Lightbox.

  461. David Apr 30th, 2006

    I can’t seem to get the loading gif to show or the close logo to show when you view the pic. It just shows a x like it can’t find the image and I dont’ even get the x to show in firefox. I don’t see where on the css file where I need to change the location of the files so it points to the right location. Any ideas of where I’m looking wrong??

  462. Nick May 1st, 2006

    re#461

    David, the loading gif is changed in lightbox.js. Try that

  463. Daniel May 1st, 2006

    I got it working when it was loading pictures that were hosted in GeoCities. But since I have most of my photos hosted in Flickr, it didn’t load them properly.

    Is there something that I need to do in order for this to work with photos hosted in Flickr?

    Thanks.

  464. Ray May 1st, 2006

    Wow, amazing script. Works great, just what I was looking for !

    It works really well within my ASP script, which shows the images out of the database.

    Thanks alot !!!

  465. Nick Toye May 1st, 2006

    #419 John Fielden

    Cheers mate, I must have missed it, :)

  466. Alejandro García May 1st, 2006

    Awesome!

    Congratulations… from México!

    Thank you.

  467. McShark May 1st, 2006

    Hi!

    First I want to give thanks and greetings from Germany!
    I’ve one questions on your nice code for my website:

    There are new versions of the js you are using. Updating them could be maybe useful, or not?

  468. McShark May 1st, 2006

    I found a mistake! (Results in a lot of 404 errors)

    You forgot to comment lines 34-41 in scriptaculous.js.
    PLEASE DO THAT!

    Thanks!

  469. Angelo May 1st, 2006

    Thanks for making a great script. I sent in some cash for your efforts.
    I implemented your script here:

    http://angeloandnicole.com/gallery_out.php

  470. Li-An May 2nd, 2006

    OK, I found some possilbe answers to my question (2 javascripts in conflict) see #346
    http://blog.metawrap.com/blog/CommentView,guid,42b961d5-b539-4d9a-b1e0-108e546ae3e6.aspx
    It seems that prototype.js is used to create conflicts. I would be happy if someone can give me an eventual solution :-)

  471. Carlito May 2nd, 2006

    Hello,
    First I would like to say that I really like you work, this script is nicely done.

    I would like to know how to reduce the space between the top of the navigator’s page and the lightbox, I have nearly 40 pixels and I would like to make it 20. I searched in the css and js files but I can’t find where I can modify this setting. Thanks if you can help.
    Carl

  472. Richard May 2nd, 2006

    re #471 Carlito

    #lightbox{
    position: absolute;
    top: 40px;

  473. Li An May 2nd, 2006

    ref #470
    It’s OK, I’ve found a solution. It was prototype.js the origin of my problem and I changed my second javascript code to work with it.

  474. Carlito May 2nd, 2006

    ref 472
    Thanks Richard but I tried that before posting, it was obvious but as it didn’t change anything (I use firefox and ie) so I came here to ask.
    Any other idea ?
    Carl

  475. Scrambler May 2nd, 2006

    In my Web I make serve ajax, the library prototype following this example: http://www.ajaxlessons.com/2006/02/18/ajax-workshop-2-building-tabbed-content/

    When I try to insert in a tab, for example second. LightBox 2,0 does not activate and it shows the image to me without the LightBox, if somebody knows like being able to connect so example the superior example with lightbox serious to explain me, Pleas Help Me :’(

    Thanks For Your Time

  476. Masa May 2nd, 2006

    Hi,
    thanks for Lokesh to provide this wonderful tool.

    I just modified Lightbox JS v2.02 to enable it to use image files without rel tag.
    You can download it from here,
    http://slightlyblue.com/blog/2006/05/rellightbox_js_v202.html
    directly from here.
    http://slightlyblue.com/dl/Lightbox/lightbox.js

    Single Picture(*.jpg/gif/png/bmp) : able to use LB without rel tag
    Grouped Pictures : use rel=”lightbox[whatever]” as same as the default version.
    maybe a solution for those flash users(unconfirmed)

    If you don’t like it, it will soon be removed, so tell me if so, Lokesh.

  477. Nick (Australia) May 2nd, 2006

    Re #455 and #411

    OPERA 8 Transparency works with this setting in lightbox.css file

    #overlay{
    position: absolute;
    top: 0;
    left: 0;
    z-index: 90;
    width: 100%;
    height: 100%;
    background-color: #000;
    filter:alpha(opacity=60);
    -moz-opacity: 0.6;
    opacity: 0.6;
    }

    /* opera fix ———————————————– */
    @media all and (min-width:0px){
    #overlay{
    background-image: url(address to.. overlay.png);
    back\ground-color: transparent;
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=”address to… overlay.png”, sizingMethod=”scale”);
    }
    }

    Hope that helps.

  478. Nick (Australia) May 2nd, 2006

    re #477

    OPERA 8 Transparency

    ps filter: progid: etc meant to be on the same line in css file..

  479. Dixel May 2nd, 2006

    I have the same problem that #475 somebody has some idea?

  480. Masa May 3rd, 2006

    well, I have time..

    re#475, 479
    http://slightlyblue.com/blog/2006/05/ajax_lightbox_js_v202_1.html

    call: myLightbox.initialize()
    after you get the AJAX.Request onComplete.

  481. Christophe May 3rd, 2006

    What a great piece of web! ;-)
    I ran thru all the comments here, but somehow couldn’t find anything about the topic I want to comment: I think it makes sense to have an animation of the lower “imageDataContainer”-element (holding caption etc.) whenever you click on a single image you want to focus. However, it can get a bit too much animation if you go thru a group of images with the next/previous links.

    Did I just oversee a feature to turn it off?

  482. mark May 3rd, 2006

    so stoked..

    made a little flickr search using lightbox 2.0

    http://homemademess.com/tagr.php

    thanks Lokesh!

  483. scrambler May 3rd, 2006

    Thanks Masa!!!

  484. BAA May 3rd, 2006

    thanx Lokesh.

    now can we add FLASH content instead of an image ?
    or the version is still not released ?

  485. Branndon May 3rd, 2006

    I would like to open a html page instead of an image. When I change the target to relfect that it doesn’t work. I downloaded a version of lightbox 1 where it was possible. Can someone tell me what I need to do to get lightbox able to open html pages rather than only images?

  486. Branndon May 3rd, 2006

    oh, i forgot, my sample site is
    http://www.projecttorque.com/index.php?content=video thats the page i want to open a html in, if you click on the car, it opens in a new page

    this page with the pictures works fine though
    http://www.projecttorque.com/index.php?content=engine

  487. Branndon May 3rd, 2006

    have been working on it this morning… I got my videos to load through a different script. But now my images are not loading! again,

    Now works:
    http://www.projecttorque.com/index.php?content=video

    Now does NOT work:
    http://www.projecttorque.com/index.php?content=engine

  488. Evgeny May 3rd, 2006

    Why is there no close button while the image is loading?

    If the image is taking ages to load – I would like my users to be able to go back to the page, and when a user is pressing the “Back” button to do it – its a great disappoitment.

    to be short:

    I want to write “Please wait while loading large image…”
    and to have a close button to ‘undo’ this action of loading.

    Am I asking for too much?

    Great script though, really like it! :)

  489. Jayson May 3rd, 2006

    Hello Lokesh!

    I have an odd problem! Your wonderfull lightbox script works on my local client (tested on mac and win) but when I upload it to the web the lightbox wont work… How can this be???

  490. Jayson May 3rd, 2006

    If you want to take a look at whats funky…

    http://www.pixelstud.com/portfolio/icons.html

  491. Joseph May 3rd, 2006

    Hi!

    I know that maybe this is a silly question, but since I have not been able to sort it out by myself I need to ask you all; I installed it in my website and I could not make it work, what it does is that the image opens up in a new page.

    I already did what Lokesh says about append the initLightbox() in the onload attribute but still not working. I have tried it in firefox 1.5.0.3 and IE 6.

    Could you tell me what is happening?

    Thank you for your advice!

  492. Mahesh May 3rd, 2006

    Re: #489. 490

    The .js files that you have uploaded are somehow messed up. When i load it up in Firefox, I see this error messages in the JavaScript console.

    Error: missing ; before statement
    Source File: http://www.pixelstud.com/portfolio/inc/prototype.js
    Line: 1, Column: 149
    Source Code:
    type is freely distributable under the terms of an MIT-style license. * * For details, see the Prototype web site: http://prototype.conio.net/ */*————————————————————————–*/var Prototype = { Version: ‘1.4

    When I view the file http://www.pixelstud.com/portfolio/inc/prototype.js , I don’t see the comment block. I am guessing the problem is with Line-endings, but could just be something totally bizarre. Try re-uploading them and make sure you upload them in ASCII mode if you are using FTP.

  493. DJ Webb May 4th, 2006

    I was impressed with the original Lightbox… The new one gives all the extra’s my users were begging me for.

    Thanks a lot Lokesh. Great work.

    Photography-of-rock.com

    Thanks again

    DJ

  494. SilverRavage May 4th, 2006

    Hey for some reason on mine it is only working for FireFox not IE, it loads the image in a blank page. It doesn’t work at all. The image opens up in a new page. What’s wrong? I saw that on the http://www.lokeshdhakar.com/projects/lightbox2/ site but tried it and it didnt work. Where it is located at is http://www.silverdimensions.net/LB/index.html

    IF anyone could help out I would appreciate it.
    Thanks alot
    Silver

  495. Will H May 4th, 2006

    Hi, I was wondering if anyone can help. I have lightbox set up to where I have an image from a video, and the caption is a link going to the video, which is a flash SWF.

    What I have been trying to do (and have been unsuccessful) is have the link to the video open up a new browser that is resized to the size of the movie. It links to the video fine, but it’s in the same browser/doesn’t resize. I tried adding a script for resizing the window inside of the caption such as…

    onclick=”window.open(‘images/video.jpg’,'characters’,'height=300,width=400′);return false”

    …but had no luck with it working, I tried to replace characters with HTML entites as well. Since I’m an amatuer with JS, maybe I am doing something wrong?

    heres what I have working. if anyone can show me how to get this linking to a new browser that is the size of the video, I would greatly appreciate it.

    Thanks, Will H

  496. tee May 4th, 2006

    First of all a great script you have.

    I am implementing the script to a site, it works great except in IE 6 which the ‘prev’ and ‘next’ buttons are not showing up, but the prev/next funtions do work.

    Further testing, tweaking with CSS lead me to a conclusion that the lightbox js is conflicting with the Dean Edwards IE7 PNG Alpha script that I use for a PNG logo, I am wondering if there is a way for them to co-exist.

    This is the page that has IE7 script.
    http://new.spotlightonthesquare.com/cuisine.html

    and here the page without and you can clearly see the ‘prev’ and ‘next’ buttons do show up.

    Thanks!

    tee

  497. tee May 4th, 2006

    Oops. I for the another link

    Further testing, tweaking with CSS lead me to a conclusion that the lightbox js is conflicting with the Dean Edwards IE7 PNG Alpha script that I use for a PNG logo, I am wondering if there is a way for them to co-exist.

    This is the page that has IE7 script and the ‘prev’/ ‘next’ buttons are not showing up.
    http://new.spotlightonthesquare.com/cuisine.html

    and here the page without and you can clearly see the ‘prev’ and ‘next’ buttons do show up.

    http://temp.spotlightonthesquare.com/cuisine.html

    Thanks!

  498. Mahesh May 4th, 2006

    Re: #495

    Will,

    its actually not difficult to do what you want.

    Step 1:
    Add a Javascript block somewhere in <head> area
    function openWin(url, width, height) {
    aWindow = window.open(URL,’thewindow’,'width=’+width+’,height=’+height+’,location=no,resizable=yes,scrollbars=yes,screenX=20,screenY=20,top=20,left=20′);
    }

    Step 2: In the caption for the image
    title=”&lt;a href=&quot;javascript:openWin(yoururl, 400, 400)&quot &gt;View Video&lt;/a&gt;

    Check it in action here: http://www.mahesh.net/lightbox/sample_gallery . The very first image has a link that will open a new window

  499. Fiestoforo May 4th, 2006

    Oh Thanks for the code, it is really cool!

  500. Will H May 4th, 2006

    Great, got it working. Thanks a million, Mahesh!

    -Will H

  501. Will H May 4th, 2006

    I actually have one more question… with the link being in the title, it shows the link when you rollover the image. Is there a way to have a caption show up in the title when rolling over the image instead of the link showing up?

    Thanks,

    -Will H

  502. Deny May 4th, 2006

    do you have any plan to make this wonderful script open html page like Thickbox did?
    That will be very great.

    Lightbox are kool :)

  503. Neil May 5th, 2006

    A VERY impressive script, well done. This is the kind of stuff that keeps the internet from stagnating! I’ll be looking to use it on some future designs that’s for sure.

  504. SilverRavage May 5th, 2006

    Re 494. Can anyone at all help me with this??

    Thanks very much

  505. AnalogPanda May 5th, 2006

    Awsome, Lokesh. Thank you for sharing!

    I do have a question. In FireFox (winxp), the blinking cursor shows up over the middle of the image. The cursor seems to stay in the last spot that a link was clicked. I’m surprised none of the 500 or so other commenters have brought this up – perhaps it’s an artifact of one of my ff extensions.

    Has anyone else witnessed this? Might there be a JS fix to turn off FireFox’s blinking cursor?

  506. Simon J May 5th, 2006

    Flash problems in Mac Safari only

    Hello,

    I am having problems in Mac Safari with the Flash header showing through the Lightbox photo when moving the mouse (possibly over the links in the flash file – my client pointed it out).

    It works perfectly in every other browser tested. The flash image has a zindex 0, lightbox has z index of 100, I have added wmode=transparent and done all the other things suggested to get the lightbox working over the top of flash content – and it does – just not for my client in mac safari.

    the test page is here:
    http://scoutphotographics.com.au/draft20.htm

    screen cap from my client’s mac is here:
    http://scoutphotographics.com.au/test04.htm

    any ideas / suggestions?

    thanks in advance

  507. Mahesh May 5th, 2006

    Re: #501

    Its possible. But requires a small change to lightbox and changing the title attribute to ‘caption’. Check it out http://www.mahesh.net/lightbox/sample_gallery/

    Step1:
    change all the title attribute in the <A> Tags to ‘caption’

    e.x: <A href=”image.jpg” rel=”lightbox” title=”Hello”>
    to <A href=”image.jpg” rel=”lightbox” caption=”Hello”>

    Step2:
    In Lightbox.js on lines 331 and 339
    change imageLink.getAttribute(‘title’)
    to imageLink.getAttribute(‘caption’)

    Before making any of these changes, just make a backup of your HTML & JS files, so that if things don’t work you have a chance to go back.

  508. Anonymous May 5th, 2006

    Just a note to say that I had a wee spot of bother with the NEXT and PREVIOUS buttons appearing, but managed to fix it by correcting the css to;
    #prevLink:hover, #prevLink:visited:hover { background: url(./images/prevlabel.gif) left 15% no-repeat; }
    #nextLink:hover, #nextLink:visited:hover { background: url(./images/nextlabel.gif) right 15% no-repeat; }

    instead of;
    #prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
    #nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }

  509. Ryan May 5th, 2006

    I cannot get Lightbox to work when using Prototype’s Periodicalupdater. I saw in a previous comment that I need to initLightbox() after changing the innerHTML of a div. I’ve tried doing everything I can think of but it still does not work. If anyone can help me out I’d really appreciate it.

    Please email me:

    r dot chamberlin [at] turn1media dot com

    THANKS!!

  510. tee May 5th, 2006

    a follow up of my previous posts #496/497, that the ‘prev’ and ‘next’ buttons not showing up in IE 6.

    Someone who writes JS for living gave me a pointer, that “the lightbox script is using window.onload which cannot co-exist nicely if there is other js in the same page”. He said a proper little handler can take care of this issue.

    I know nothing about JS, and is hoping Lokesh or anyone can who knows can make a little upgrade version for the handler.

    Much appreciated!

    tee

  511. tee May 5th, 2006

    Hi never mind. I decided to try the MSIE alpha filter for my png logo and placed it in if ie conditional comment. It solves my problem now.

    tee

  512. Killer Possum May 5th, 2006

    This script is AMAZING. And the fact that it’s free makes it even more amazing. So easy to use, and so elegant. Thank you so very much! I will be recommending this to everyone I know!

  513. Anonomyus May 5th, 2006

    The window for some reason fills my whole browser window. Could someone tell me how to prevent this???

  514. ryan coyle May 5th, 2006

    I am having trouble with the script opening the last picture in a chain first instead of starting at the beginning. any help?

  515. reini May 5th, 2006

    great work!
    respekt!!!

    http://www.weisseschatten.de

  516. SilverRavage May 6th, 2006

    Hey This script is really awsome, but no matter what I have done or looked into I still cant figure it out. Can someone email me with some help pleaseeeeeee. Thanks

  517. ryan coyle May 6th, 2006

    ok so I figured out that when I use the text link “image #1″ the script opens that image and goes through from beginnning to end, but I am trying to use graphics to open the script and it always starts at the end when I do (on-line It won’t find any images, first or last, when I link the script with an image). if anyone has run into this problem I would be stoked on help…to lokesh I would be willing to pay to get this working right I really like it, and really appretiate the time you spent to offer free scripting, it is just a lot of code to fish through to figure out these little quirks.
    thanks

  518. silverRavage May 6th, 2006

    be more specific did you follow the steps in the “test page” html

    are you using dreamweaver?
    did you
    “Include the Lightbox CSS file (or append your active stylesheet with the Lightbox styles)”

  519. ryan coyle May 6th, 2006

    comment 518 was from me guess I am tired, thought I was typing in a commet subject :)

  520. LastOne May 6th, 2006

    Hello!

    I’m using Lightbox 2 in my wordpress blog. The Question: is it possible to fix the “prev” and “next” buttons and place them autside the picture when it pops up? So that it didnt disappear when you move the mouse-pointer away?

  521. Ke1ner May 6th, 2006

    If the image’s width is very big , how can I do ?
    ex: DC foto over 2000 px . display this foto.

  522. GrayShade May 6th, 2006

    Nice work, but scrolling the page with an open image is slower than in the first version. (Firefox 1.5). Any ideas with this?

  523. Andrew May 6th, 2006

    Fristy what a brilliant script! :) Thank you !

    Expect a donation soon :) -> i’m not joking :)

    I have 3 questions -

    1- what setting in the css do I change to make the box appear closer to the top of the screen?

    2 – with the new update came the addition of the “close” image. How can I remove this image (as I prefer just the cross)

    3 – I’ve noticed that if I have a vertically large image that is larger than the vertical resolution of the screen then the close link doesn’t appear and I can’t close the image. Can this be fixed? Or is it best to just keep images small?

  524. Rodrigo May 6th, 2006

    aloha….one cuestion….its posible call the ligthbox from a flash button???
    How???

  525. SilverRavage May 7th, 2006

    ryan coyle, It works but i cant get it to work in IE I have tried the code that it says on the page to try but it didnt work and yes i am using Dreamweaver, and half coding it, what did you mean exactly by append

    Thanks again

  526. Li An May 7th, 2006

    #520 Take a look at this http://www.palintest.com/products/multiphot/7500
    view the source, get the css file and the ligtbox.js file and compare with yours. You may read all these comments to find how to get Next and Prev button be always visible.

  527. Anonomuys May 7th, 2006

    Re: #513
    It’s OK Now.

  528. pim May 7th, 2006

    Hallo,

    first of all thanks for the great lightbox solution.

    Everything works perfectly

    I am haveing problems in IE and FIrefox with a lightbox over a flash header. No, the Flash is not in front of the lightbox, my problems are borders (when the mouse is in the area where the flash file is in the background) around the flash header and the lightbox (the half lightbox, e.g. the next or the previous part of the image, is surrounded with a border similar to the border of the flash header).

    The flash image has a zindex 0, lightbox has z index of 100, I have added wmode=transparent and done all the other things suggested to get the lightbox working over the top of flash content.

    link: http://www.bistro-rosarium.de/new/?Karte
    screen shot: http://www.bistro-rosarium.de/new/1.jpg

    any suggestions?

    thanks in advance
    pim

  529. eric May 7th, 2006

    i have a bug on this with safari and images loading on top of a flash film….
    anybody have a fix?

    here is the site
    http://www.palaquin.com/SelfCare.aspx

    use this email.
    test_at_mailinator.com

    works fine in Firefox and IE pc….

    help me please.

  530. jasperguy May 7th, 2006

    #526 Li An

    Thank you, I finally got the next and prev to work under the captions.

    http://eddiewong.ca/photograph_wedding.html

    Thanks for the script! fantastic. If anyone see any bugs on my working site, please let me know, I need someone to help me test it with a MAC platform.

    jasperguy at yahoo dot com

    Thanks in advance.

  531. Simon J May 7th, 2006

    re 506 and 529

    Flash problems in Mac Safari only

    Hello,

    Has anyone found a fix to overcome Mac Safari quirks with lightbox (and really all DHTML)?

    I think we need a guru!!

    >>original comment>>>
    I am still having problems in Mac Safari with the Flash header showing through the Lightbox photo when moving the mouse (possibly over the links in the flash file – my client pointed it out) – may also have something to do with the mousover of the next and previous images)

    It works perfectly in every other browser tested. The flash image has a zindex 0, lightbox has z index of 100, I have added wmode=transparent and done all the other things suggested to get the lightbox working over the top of flash content – and it does – just not for my client in mac safari (which is what he uses).

    the test page is here:
    http://scoutphotographics.com.au/draft20.htm

    screen cap from my client’s mac is here:
    http://scoutphotographics.com.au/test04.htm

    any ideas / suggestions?

    thanks in advance

  532. tee May 7th, 2006

    #531 Simon J

    It’s Z-index issue. Although you’d declared in your flash object, but you need to declare Z-index in #headerA.

    Note that Z-index only works when you declare Position: relative (or absolute), which you omitted in the #headerA

    set higher Z-index for the div tag that holds your Lightbox images.

    Hope this helps!

    tee

  533. tee May 7th, 2006

    >Although you’d declared in your flash object, but you need to declare >Z-index in #headerA.

    This line got cut off in my previous message.

    param name=”wmode” value=”transparent”

  534. Dan Steingart May 7th, 2006

    This package rocks! I’m having trouble integrating it iinto a google maps mash-up though… it seems that an openInfoWindowHtml call in the google maps api creates a seperate page within the page…. when I try to call … from an info window it just opens the link in a new page…. when I call it from a link outside of the map it works. Anyone use this with google maps before and get it to work? Thanks in advance.

  535. Gomi May 8th, 2006

    This is awesome! I’m still picking up my jaw from the floor… thank you very much for unleashing such a beauty! :)

  536. Simon J May 8th, 2006

    re #532 and 533

    Thank you Tee. Will try the position relative suggestion and advise the results.

    (already add param name=”wmode” value=”transparent” and embed name=”wmode” value=”transparent”)

    Cheers.

  537. nick May 8th, 2006

    why thumbs dont show up? http://e-salonica.com/test/index.php

  538. jasperguy May 8th, 2006

    #537 nick
    It’s a php issue.

  539. Simon May 8th, 2006

    re #532, 533 (and 531)

    Hi Tee,
    Adding position relative makes no difference to the flash header showing through in MAC Safari. Thanks for the suggestion.

  540. Simon J May 8th, 2006

    re 531

    RE Mac Safari Showing through Lightbox

    Any suggestions:

    the test page is here:
    http://scoutphotographics.com.au/draft20.htm

    screen cap (from my client’s) mac is here:
    http://scoutphotographics.com.au/test04.htm

  541. george w May 8th, 2006

    re #540

    PERHAPS HIDE THE FLASH DIV?

    simon

    one way to get it working might be to hide the flash content when someone clicks on the lightbox link. I tried it but couldn’t get it to work when the rel=lightbox was in the link.

    Does anyone else know how to hide a div when someone clicks on a lightbox link and then show it again when lightbox is closed?

    this could benefit all users having difficulty with mac display of flash content showing through the lightbox

  542. eric RE SAFARI May 8th, 2006

    RE SAFARI

    Does the maker of lightbox have any fixes for this flash issue in safari?

    thanks

  543. Jon G May 9th, 2006

    re #540, 541, 542

    This is a quick hack.

    Open lightbox.js

    Look for
    start: function(imageLink) {

    and add
    document.getElementById(‘header’).style.display = “none”;

    (replace header with the name of the div)

    And look for
    end: function() {
    and add
    document.getElementById(‘header’).style.display = “block”;

    (replace header with the name of the div)

    Hope this helps.

    Cheers.

  544. Sreedharan May 9th, 2006

    Wov.. It’s really amazing..

    I used it in my site…

    My site have the feature to change the number of images dynamycally by means of sliders…

    While am clicking on the images your lightbox effect didnt work.. it loads the image in the browser in a old way… after i came back (by clicking on the brwser’s back button).. it works fine…

    So, please help how could i fix this bug.. i dont know what mistake i did…

  545. Sreedharan May 9th, 2006

    I forgot to give you my site url in my last comment…

    http://www.asokapapers.com/ajax/demo/index11.php

  546. tee May 9th, 2006

    #539 Simom,

    It’s because you didn’t do it right.

    See the page I came up:
    http://lotusseedsdesign.com/lb/lb.html

    I also made a screen shots for PC’ IE, Safari, Firefox and Opera for PC and Mac. Click the links on the left to see the results. For some strange reason the Opera on Mac, the flash stays on top of the lightbox’ image. It’s definitely z-index issue, but a bit unusual for Opera I must say. It maybe a bug for the later version of Opera Mac. You may want to google CSS bugs for Opera to find out why.

    In Safari, the flash flickers a bit when large image slowly showing up, but I don’t think that would be a problem as far as performace concerned.

    Here is what I did to your code:

    1) remove the z-index from your tag in your html
    2) #headerA {
    position: relative; z-index: 50;

    3) #nctR {
    position: relative;
    z-index: 100;
    }

    4) #nctThumbs {
    position: relative;
    z-index: 200;
    }

    I actually not sure #4 if needs z-index howerver when I removed it, the thumbnail stays on top of the large image, so I put it back.

    Hope this helps!

    p/s.I will look into the Opera Mac problem tomorrow when I get a chance. Really must go to bed now.

    tee

  547. Simon J May 9th, 2006

    RE 543 (540, 541, 542)

    Jon G you are an absolute genius.
    thank you for your suggestion and coding – it works a treat on the PC – just waiting to hear back from my client on the MAC.

    demo: http://scoutphotographics.com.au/draft25.htm
    IE quirk:http://scoutphotographics.com.au/test05.htm

    One perculiar thing happens in IE(6) on PC with this method –
    when the page is first loaded, a box (as if its a link off the whole header) appears around the original header (without mouseover) with alt tag “Press SPACEBAR or ENTER to activate and use this control”

    when you click the header the box appears and links can be accessed as normal.

    do you know how to overcome this quirk so the header operates as normal first off with your div hide suggestion?

    either that, or do you know how to target it towards MAC only?

    thank you kindly for your help.

  548. nick May 9th, 2006

    #538 jasperguy

    can you help me with that I dont know what I am doing wrong please I need your help

  549. Jon G May 9th, 2006

    Re #547

    That seems to be related to this
    http://www.amarasoftware.com/flash-problem.htm
    Google: http://www.google.com/search?q=click+to+activate+and+use+this+control

  550. Sreedharan May 9th, 2006

    Plz anyone help me

    #544 and #545

  551. Simon J May 9th, 2006

    Re #547

    Thanks Jon G
    All sorted now – much appreciated.

    http://scoutphotographics.com.au/draft28.htm

    God bless.

  552. Simon J May 9th, 2006

    #546 tee

    sensational. Thanks for the help Tee.
    will give it a run past my client on the Mac.
    Thank you kindly

  553. cl May 9th, 2006

    two questions:

    1) there a way to code lightbox so that image opens up onmouseover?

    2) i’m using a javascript/css ticker that initially hides all images except the first one…lightbox is not working for the images hidden with my div tags once they appear…is there a way to make lightbox work even though images are hidden initially?

    solutions?

  554. Dave May 9th, 2006

    Hey guys, not sure if anybody can help me out. I’m using a drop down menu and would like to use Lightbox, but it seems as if there is a conflict of scripts. I get these errors:

    Error: l6963656E73654E756D626572 undefined is not defined
    Source File: http://www.activetuning.com/scripts/mmenudom.js
    Line: 31

    Error: _hrF is not defined
    Source File: http://www.activetuning.com/scripts/mmenudom.js
    Line: 16

    Any ideas what I can do to fix it? If I search “onload” in mmenudom.js there are two instances where it is coded…

  555. cl May 9th, 2006

    figured out the answer to question #1 in my previous post (#553), but still stumped on question #2…

  556. KayfabeRockStar May 9th, 2006

    Anyone know if you can use this on a link where it draws from a database? Example: output(link) ?>” target=”_blank” rel=”lightbox”> WHERE output(link) ?> pulls the URL. It works normally without LIGHTBOX, but when you use the rel= it will pull up the box and the loading graphic but never load the image. When you hover on the thumbnail it shows the url as http://www.mydomain.com/index.php?=1 or =2, etc. never loads the image though…

    Thanks!

  557. Lukas May 9th, 2006

    G.R.E.A.T. script. Thanks a lot. I use it in my own php gallery script (www.planetluc.com) which was a quite allright before but your lightbox makes it really great. Thanks again.

  558. Cameron May 9th, 2006

    Can someone let me know whats going on with lightbox on my page?

    http://www.terrabalandcompany.com/HomesForSale.php

    It works perfect in safari and ie6, but with firefox, a second scrollbar appears and the lightbox isn’t centered at all.

    Seems like a really weird bug.

  559. Aaryn May 9th, 2006

    Hello,
    I’d like to use Lightbox on my webpage. Its a digital photography page, hosted on geocities.com. My images are hosted on googlepages because of the storage difference. Lightbox starts to come up, but then the image opens in a blank page instead. So, it makes me wonder – is this a geocities problem, a google problem, or a Lightbox problem? Any thoughts? Thanks!

  560. Jafar May 9th, 2006

    Hi;

    the script is one of the best one I have seen. Any one could tell me how to put a text on the bottom left hand side. I have a site that I show pics of places and would like to put the places description .

    thanks

  561. Sreedharan May 10th, 2006

    #558

    I think you may forget to define the rel property of the tag..

    check it…

  562. Nick (Australia) May 10th, 2006

    re 560

    HI Jafar,

    To add a caption to your photos use the title attribute in the a href tag of your image

    eg
    a href=”someimage.jpg” rel=”lightbox” title=”Noosa, Qld”

  563. Simon J May 10th, 2006

    re #540, 541, 542

    SAFARI > lightbox working but apparently the CLOSE BUTTON does not

    Well thanks to Jon G I have lightbox working over a flash header in Mac Safari by hiding a header div that contains the flash element (and “replacing” it with a jpg mockup) on clicking a lightbox image and displaying the flash header again on closing the lightbox.

    This works a treat on the PC – however now the close button doesn’t apparently work.

    So I’m wondering if
    A: someone can verify this for me in Safari on the MAC and
    B: if someone knows the code to also get it working in Safari

    the relevant code is on line 614 of the lightbox.js file:
    document.getElementById(‘headerA’).style.display = “block”;

    the page is here.
    http://scoutphotographics.com.au/draft25.htm

    Thanks in advance.

  564. Douglas May 10th, 2006

    Didn’t have time to read through all the posts so maybe someone already mentioned this. I’m using Firefox v1.5.0.3 and when I tried your demo some weird things happened. I clicked on the images and they loaded on top the page, but when I right-clicked them, there was no “Save Image As…” on the context menu. Also, the Firefox extension (Image Toolbar) that pops up when you mouseover an image (kinda like in IE) only worked occasionally. It worked for a split second when the image first loaded but disappeared as fast as it appeared.

    Anyway, thought you should know.

    I’m not knocking Lightbox, just need the above things to work since I’m planning on using a family site with thousands of photos.

    Thanks!

  565. finnagin bell May 10th, 2006

    JS CONFLICTS ???

    I’m a self-educated website hack, and have stumbled my way through several site developments. However I am REALLY TRUELY stuck trying to integrate Lightbox into my latest site rebuild (due to JS conflicts I suspect).

    Can anyone help me?

    I have the site posted live here http://www.anatomic.com.au/lightbox_ex.htm and the “want-to-be lightbox launcher” is on the 3rd menu rollover “Matrix Pro Road??? , and is the only thumbnail image on the page. [it the not the large rollover image, but the small thumbnail below].

    So you know, currently the thumbnail image launches a new page (common JS conflict from what I have read). So I have followed the “quick fix advice??? (to append the initLightbox() to the onload attribute), but to no avail. Any advise would be greatly appreciated!

  566. finnagin bell May 10th, 2006

    *** Cancel last order please. I must be tired and need to sleep – a simple src error was my demon.

    HOWEVER, I am having issues with the images and and GIF files not displaying inside LB ???????????????

  567. Jens May 10th, 2006

    Great script, thanks.

    It works fine in Safari and Firefox for me. However, can’t seem to get it running on IE 6.0.28x. Any known issues with that? Also the demo page only opens the images in a new window, no JS applied.

    First I thought might be related to the issue with the onLoad in the body tag, but since it is the same for your page, I guess that is not the problem. Any information I can provide to debug this?

    Cheers,
    Jens

  568. Kerion May 11th, 2006

    very stylish! :)

    Congratulations for the good work!

  569. Kieran May 11th, 2006

    Hi guys,

    I’m wondering if anyone can throw any light on a problem i have.

    I am building a portfolio-> http://www.picturegrid.net

    I’d like to be able to link offsite to a specific page for each photo. For example, any specific photo has a corresponding specific page on another site. I thought maybe i could insert a tag for each image and have lightbox just link to the contents of that tag (like it sucks up the title tag and shows it as a caption).

    However i’m not sure how to implement that because every time i try it borks. :)

    any ideas?

  570. Nathan May 11th, 2006

    Firstly, WOW and thanks for your efforts. I’m currently trying this script on a real estate website (under development) and so far so good, one thing I would really like to do is replace the hover nav links with a nav bar either at the top or bottom of the image, also I’d like to replace the image links with text links… I’m working on it and I’ll get it in the end.

    Secondly I would like to back up post #162 by Paul: YOU NEED A FORUM.

    For all the attention this script is receiving I think this is the most intelligent comment made so far, the other 99.9% seem to be questions, it’s hard to follow them without some sort of threaded structure making it harder for peeps to get an answer (whether it be from yourself or other users). Please consider this idea, you may find it makes your life (and your supporters lives) easier.

    Cheers for the script, I’ll be donating something as soon as I send a site using this scrip live, your effort is much appreciated.

    Cheers!

  571. Paul May 11th, 2006

    I was wondering if someone could help me with this. I would like the slideshow to loop, so that when you reach the last photo the ‘next’ botton goes back to the beginning.

    What do I need to change to have it do that?

  572. Andrew Coggins May 11th, 2006

    Hi, I’m using Lightbox 2.0 and I think it’s fantastic!
    Can anyone tell me how to change the backgound (around the displayed image) so that it’s both:
    1. A different colour
    2. More transparent

    Also, how about changing the image position height so that the picture appears lower down on the screen?

    Thanks!

    Andrew.

  573. New and Lost May 11th, 2006

    Hi all – First off – I stumbled on this last night and I think it’s great!

    I’m currently updating my site but (like some other users here) the pictures are opening on a new page rather than in the same page…and just as a regular pictrue.

    It’s almost as if the browser isn’t recognizing the relevant Lightbox files.

    Can anyone please help?

    Here is the entire code for the test page where LightBox should be working but isn’t:

    Gil Arenas Gallery

  574. New And Lost 2 May 11th, 2006

    Ok, rookie mistake – the code didn’t show up…trying again:

    {header

    }

  575. Anonymous May 11th, 2006

    i give up…

  576. Spudly May 11th, 2006

    First off, I am no expert and know just enough to make myself very dangerous. I read through each and every one of these posts (and I agree that this needs to be a forum!) and a few people have asked how to use Lightbox in a frames environment and there have been a couple of postings about using it with an IFrame. I’ve used Kaz’s instructions (414/416) and they worked well for showing one file but how do I show an array of pictures? To make things even more complicated- how do I utilize LB’s ability to have many arrays by using the rel = lightbox[array] command? Keep in mind I’m a bit slow, so small words would be helpful… :-)

  577. Will H May 12th, 2006

    First of all, many thanks Mahesh for your help with my links issue (#501), it was of great help.

    Has anyone had this issue with PC firefox:

    The lightbox appears beneath the overlay, and the images appear beneath the overlay, as well as below the lightbox.

    Looks fine in internet explorer 6. Z-indexes in the css havent been changed from the original code.

    Any help would be greatly appreciated.

    Thanks,
    Will H

  578. Razerz May 12th, 2006

    Hello, first of all I wish to thank you for making this fantastic way if displaying pictures. But I have a problem, I want to position the picture higher than default, similar to what #572 wants to do. Another thing, the half-transperant background doesn’t stretch all the way out in IE, there is a small gap at the bottom and at the right side. I have seen a fix on the “official” page, but I don’t understand where to put
    body{ margin: 0; padding: 0; }
    Any help would be greatly appricicated (wrong spelling, I know, English isn’t my first language).

  579. Connie May 12th, 2006

    Hmmm, I thought i posted earlier with a similar problem to New and Lost…. If anyone could help, that would be greatly appreciated… i’ve been trying to figure out what my problem is for the past 2 hours… yea…

    But i wanted to thank the author for this code… not very many people like to share… =]

    the site that needs help is : http://www.uweb.ucsb.edu/~peachy_cheeks/demo2/mmmdesign.html

    please… someone help! i’m going to be fustrated all night!

  580. Anonymous May 12th, 2006

    It worked! http://www.gilarenas.net/newgal.html

    My users will love it!!! Thank you so much (working on a page redesign and this is the PERFECT [pic gallery)

  581. Don May 12th, 2006

    How come the close button image doesn’t show or the loading image? It’s just a blue box with a question mark. Help?

    http://flipstah.com/blog

  582. Anonymous May 12th, 2006

    In regards to my question in #576, here’s the link to the test site project:

    http://www.lausanneschool.com/vtour/map.html

    It’s a virtual tour of our school and I’m using LB to display pictures of each of the areas. I’m only wanting the single image to show and then open into an array of pictures. Any suggestions on making this work with iFrames?

  583. wayne May 12th, 2006

    i utilized the script for my php gallery here. great stuff.

  584. wayne May 12th, 2006

    i utilized the script for my php gallery here: http://www.uffleman.com

    great stuff.

  585. Mahesh May 12th, 2006

    re: #577

    Will,

    if you can give a link to the page, it might help in better understanding your problem.

  586. Will H May 12th, 2006

    re: #585

    Mahesh,

    here is a link to my page that I am trying to get working in firefox.

    http://willholman.com/newsite/portfolio.php

    if you have any further questions, the contact page on my site has my email and screen name. thanks again.

    Will H

  587. WIll H May 12th, 2006

    Actually Mahesh,
    My php contact forum isn’t working, so if you wish to respond to me via email, my address is will@willholman.com

    Thanks!

    Will H

  588. Elliot Smith May 12th, 2006

    Great work. I’m using it on FlickrLilli (http://flicklilli.org.uk/), my Flickr Creative Commons search engine.

  589. Spudly May 12th, 2006

    Please forgive my crossposting, but I’m really needing some help on this. This continues the issues I mentioned in 576 and 582:

    I’ve figured out how to have the hidden form call for the REL of the pictures:

    In the iFrame window, use this code:
    [CODE] Click image

    [/CODE]

    In the Main frame window, use this code:
    [CODE]

    function lBiFrame(obj) { //Create the function for your onclick event in your link…
    var iframe = window.frames['cwindow']; //this has to be the name of your iframe.
    var iframeForm = iframe.document.lBiFrame_form; //this has to be the name of your frame and your form.
    var hrefvalue = iframeForm.LightBox_iFrame_imgUrl.value; //this has to be the name of your “Image URL” hidden field.
    var titlevalue = iframeForm.LightBox_iFrame_imgTitle.value; //this has to be the name of your “Image Title” hidden field.
    var relvalue = iframeForm.LightBox_iFrame_imgRel.value; //this has to be the name of your “rel” hidden field.
    var simulated_iFrameLink = document.createElement(‘a’); //Creates a href object
    simulated_iFrameLink.setAttribute(‘href’, hrefvalue); //Sets the href object to your lightbox image.
    simulated_iFrameLink.setAttribute(‘title’, titlevalue); //Sets the title object to your lightbox image.
    simulated_iFrameLink.setAttribute(‘rel’, ‘lightbox’, relvalue); //Sets rel href object to your lightbox image.
    //alert (‘href: ‘ + hrefvalue + “, Title: ” + titlevalue + ‘, rel: lightbox’ + relvalue); //For debug, to test if href, title, and rel are passed correctly..
    myLightbox.start(simulated_iFrameLink); //Starts lightBox
    }


    [/CODE]

    Here’s my problem- how do I now execute the rest of the images. I’ve tried placing them on the main page, placing them in the iFrame, creating more hidden forms, etc. Anyone have a clue as to how to make this work? Any help would be greatly appreciated!

  590. Philipp May 13th, 2006

    Great work, much apprechiated. Will be part of the next ZEITDENKEN to be found at http://zeitdenken.de next month or so.

  591. Anonymous May 13th, 2006

    I have updated to the new version, and it works great in FF. Although it doesnt work in IE at all. Two things happen, if im opening a single pic it shows it loading, but then opens in a new page. And if i click on a group image it just opens in a new window. What do i need to do to fix this and get it to work both in IE and FF?

  592. Tyz May 14th, 2006

    Love this script great work.
    But I ran into a small usabillity problem, when using a set of images it becomes impossible to save the image with right click->save image as, because the image is a link to next or previous image. You can only save or copy the link informatie and not the image itself.
    Is there a simple solution fot this?

  593. ed May 14th, 2006

    love lightbox.

    question, though…. i’m puting together a site that uses the Rico toolkit, specifically the “accordian” div effect. i’m trying to get lightbox to work with it to display a gallery and i just can’t get it to work. since the Rico stuff requires an “onload” call, i did the “init” method but to no avail. anything i’m missing to get this to work?

    thanks for any advice you can give me. keep up the great work!

  594. Mahesh May 14th, 2006

    Re: 586

    Will,

    I got it to work in Firefox with some modifications. I removed lightbox related styles from green.css back into lightbox.css. In the process I messed up the Tooltop effect. So u may have to debug that. Check it out here: http://www.mahesh.net/lightbox/holman

  595. Anonymous May 14th, 2006

    #594

    Mahesh,

    Thank you so much. I thought I had tried using the lightbox styles seperately, but I guess I hadn’t. Was there any other modifications you made? Hopefully I can get my tooltips working in conjunction as well. Thanks again, you have been a huge help.

    Will H

  596. Will H May 14th, 2006

    Re: #594

    Mahesh,

    I got the tooltips working as well, I moved the css for them into their own style sheet as well, check it out!

    http://willholman.com/newsite/portfolio.php

    I know that this isn’t directly a lightbox-related question which I apologize for posting on here, but I was unable to locate your email address on your website. I’m having trouble with my tooltips, I only want them to show up when you roll over my thumbnails, not on every link on my page. They also show up on the lightbox next and previous buttons, as well as the close button, which I do not want.

    If you have time to look over this, I would greatly appreciate it. Thanks so much again for all your help.

    Thanks,
    Will H

  597. Mahesh May 15th, 2006

    Re: #596

    Will,

    I know exactly what u are facing. I had some time back tried “SweetTitles” alongwith Lightbox. I thought of a solution but haven’t really had the time to implement it. I will try it out and let you know if I have a solution.

  598. Will H May 15th, 2006

    Re: #597

    Mahesh,

    Thank you so much, you have been an amazing help!

    Will H

  599. Nathan May 15th, 2006

    @ #593ed

    Have you tried the mooFx toolkit, it uses the same js library (prototype.js) as lightbox2, you might find it more compatible. It does the accordion thing you’re talking about too.

    http://moofx.mad4milk.net/

    @ a couple of posters who have mentioned the dotted border around the anchor tags, you can remove this with some simple css.

    a {
    outline:none;
    }

    @ a couple of other posters, if your close button image and or loading image is not showing up try changing the path in the config part of the js to an absolute path i.e.

    var fileLoadingImage = “http://www.sitename.com/pathtoimg/loading.gif”;

    var fileBottomNavCloseImage = “http://www.sitename.com/pathtoimg/closelabel.gif”;

    This works for me 100% of the time, I had trouble with relative paths.

    to anyone having trouble getting lightbox up and running, the first thing to do is check you code, then check it again, then once more to be sure. Once you are positive your code and paths are correct and it still wont work leave a message. Looking at some of the posts here I’d say most of the problems are not due to lightbox but a misunderstanding of the code you are writing (not to say you’re all dumb).

    I’ve come across the same issues as some of the posts here and 9 times out of 10 it was something I did wrong.

    Also on my last post I mentioned I was trying to remove the hover nav and replace it with a text based nav bar, I got this working with relative ease, a credit to your well written code Mahesh. If anyone is interested in how I did this say the word and I’ll post the code.

    Cheers.

  600. Anonymous May 15th, 2006

    Hi.

    LB is really great.

    Any reason why I am getting a blue border around my thumbnail?

    Thanks

  601. Nathan May 15th, 2006

    @ #600

    CSS:

    a img {
    border:0;
    }

    I forgot to ask my question, I have noticed a few people want to know the same thing. Is there any way to change the offset from the top of the browser, my images take up the best part of the screen meaning the bottom of the lightbox is below the bottom of the screen. If I could change the current offset by 10px I’d be right, but changing the height in the CSS has no effect. How can it be changed?

    Cheers!

  602. Anonymous May 15th, 2006

    @#601

    Thanks Nathan! Blue border is gone now.

    Cheers!

  603. Chris May 15th, 2006

    Very impressive script… but I NEED HELP!!!

    I previously saw where someone had posted a modified script on this msg board with tabbed/gallery functionality. I designed a static example of what his modified script resembled at: http://www.mysticonline.com/dev/lightbox_mod.jpg

    I’ve gone through most of the msgs and can’t locate the original post with the mod script web address. Can someone tell me where to find it?

    Basically, I’m trying to get the script to cycle through multiple images of independent galleries when only displaying one text link or thumbnail for each gallery.

    I’d like to list multiple party dates (galleries) plus one thumbnail each as links, each of which will contain 40-80 photos in each gallery (sets), and when the user clicks on any date, it will launch the lightbox which in turn displays the specific gallery and all related photos in the set. The tabs at the top of the lightbox allow the user to switch between galleries without having to close the lightbox.

    Example:
    • Party #1 Jan 10th (one clickable thumbnail here)
    …[this would link to gallery #1 containing 40 related photos in the set]

    • Party #2 Feb 14th (one clickable thumbnail here)
    …[this would link to gallery #2 containing 60 related photos in the set]

    • Party #3 Mar 5th (one clickable thumbnail here)
    …[this would link to gallery #3 containing 80 related photos in the set]
    Etc….

    Someone please help!
    mrmystic@bellsouth.net

  604. Michael May 15th, 2006

    Hi,

    I’m using Lighbox and some of you have asked about the blinking cursor in firefox. I fixed this in my script.
    You only have to add
    if (!document.all) document.getElementById(‘prevLink’).focus();

    to the showImage: function(){

    It sets the focus on a hidden element and the curor is gone in Firefox. You have to use the document.all because ie does not allow this (and don’t has this problem anyway).

    I hop I helped someone :).

    /michael

  605. Mahesh May 15th, 2006

    re: #596

    It turned out to be easier than I thought to fix the problem of the blank tooltips and its not even a hack.

    In sweetTitles.js look for this block of code (around line 29)
    for ( j=0; j

  606. Mahesh May 15th, 2006

    re: #596

    It turned out to be easier than I thought to fix the problem of the blank tooltips and its not even a hack.

    In sweetTitles.js look for this block of code (around line 29)
    for ( j=0; j<curLen; j++ ) {
    addEvent(current[j],’mouseover’,this.tipOver);
    addEvent(current[j],’mouseout’,this.tipOut);
    current[j].setAttribute(‘tip’,current[j].title);
    current[j].removeAttribute(‘title’);
    }

    After the opening brace of the for loop just add this line .

    if (current[j].getAttribute(‘title’) == null) continue;

    Now the above block should look like this
    for ( j=0; j<curLen; j++ ) {
    // Quick check for Tags that don’t have ‘title’
    if (current[j].getAttribute(‘title’) == null) continue;

    addEvent(current[j],’mouseover’,this.tipOver);
    addEvent(current[j],’mouseout’,this.tipOut);
    current[j].setAttribute(‘tip’,current[j].title);
    current[j].removeAttribute(‘title’);
    }

    That should do it.

  607. jan peter adams May 15th, 2006

    Very impressive script… but I NEED HELP!!!

    I previously saw where someone had posted a modified script on this msg board with tabbed/gallery functionality. I designed a static example of what his modified script resembled at: http://www.mysticonline.com/dev/lightbox_mod.jpg

    I’ve gone through most of the msgs and can’t locate the original post with the mod script web address. Can someone tell me where to find it?

    Basically, I’m trying to get the script to cycle through multiple images of independent galleries when only displaying one text link or thumbnail for each gallery.

    I’d like to list multiple party dates (galleries) plus one thumbnail each as links, each of which will contain 40-80 photos in each gallery (sets), and when the user clicks on any date, it will launch the lightbox which in turn displays the specific gallery and all related photos in the set. The tabs at the top of the lightbox allow the user to switch between galleries without having to close the lightbox.

    Example:
    • Party #1 Jan 10th (one clickable thumbnail here)
    …[this would link to gallery #1 containing 40 related photos in the set]

    • Party #2 Feb 14th (one clickable thumbnail here)
    …[this would link to gallery #2 containing 60 related photos in the set]

    • Party #3 Mar 5th (one clickable thumbnail here)
    …[this would link to gallery #3 containing 80 related photos in the set]
    Etc….

    Someone please help!
    michielseerden@hotmail.com

  608. Tiggr May 15th, 2006

    Just a small tipp: For alternative loading images, have a look at http://www.ajaxload.info/

  609. Tarb May 15th, 2006

    Love the script – just a quick question – what controls the positioning of the close box? I’m trying to move it to the top of the image instead of the bottom…

  610. Anonymous May 15th, 2006

    Works great on pages without flash objects. However, I tried it on a page where I have a flas movie playing, whenever I click on the thumb, the new image opens up just fine, the effects are working, BUT the .swf movie overlaps the new image

  611. Ehsan Haque May 15th, 2006

    LightBox JS v2.0 simply Rocks!!! Using it on my site and looking forward to add this cool feature on my upcoming projects.

    Thanks to Lokesh for the brilliant effort.

    Thanks and God Bless!!

    Ehsan
    http://ehsan.bdwebwork.com

  612. Anca May 15th, 2006

    Yeah same here with the flash animation overlaping the lighbox after you click the thumbnail.
    Any help is appreciated.

    Anca x_code_15@yahoo.com

  613. Justin Barkhuff May 15th, 2006

    The California Lutheran University Web Center thanks you for this!

    We are going to be using a modified version for all of our photo galleries.

    Recent uses include:
    Usage 1
    Usage 2

  614. Nathan May 15th, 2006

    @ #604

    The blinking cursor is an accessibility option in firefox. Under Tools – Options – Advanced – General – Accessibility you will see an option called (Allow text to be selected with the keyboard) or press f7 to turn it on and off.

    Disabling this with script might affect people who rely on the feature, I’d suggest from an accessibility point of view it is better that some people see a blinking cursor than lose functionality they may require?

    @ #601 (Me)

    I found a way to reduce the top offset of the lightbox (the distance from the top of the browser window) but I’m unsure how to increase it, this solves my problem at least. For your info:

    Look for this line in the script:
    var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 15);

    I changed the end of this line to be (arrayPageSize[3] / 30); in effect this halves the top offset. I’m not sure how to increase it but I have no need to , so I haven’t really spent much time trying however I believe its just a matter of playing with the math. Hope this might help others though!

    Cheers!

  615. Lloyd Borrett May 16th, 2006

    Brilliant script.

    Has anyone figured out the changes required so that the lightbox.css file will pass W3C CSS Validator?

    Best Regards, Lloyd Borrett.

  616. Smeagol May 16th, 2006

    I see that many request a resize feature, and i want to sign up on that too!
    Hope to see it in lightbox soon! :)
    Making the css pass validation is something i really would like to see too.

  617. William May 16th, 2006

    Does someone have any idea (as it was requested before) about making a slideshow with this script. I guess the setInterval could be used in Javascript to do so ?? Help please…

  618. Rob May 16th, 2006

    Thank you for your contribution; this is nice work.

    One disadvantage to such a way of photo presentation is that in a photo-gallery-like application, it appears that individual images are not individually bookmarkable with their own unique URL. Is there a kind of URL that will cause the lightbox to be invoked immediately for a specified image, while still showing the page containing that image? This is not a complaint I have specifically about lightbox, but perhaps about all Javascripty web apps in general? (I’m not a web developer, so maybe this is an invalid “complaint”.)

    I use QuickyPix as my photo gallery backend and hope to integrate lightbox with it, but I really like QuickyPix’s bookmarkability of individual images.

    An example photo gallery using lightbox can be seen at pyxy-gallery.

  619. Rob May 16th, 2006

    #592 (Tyz) — you can modify lightbox.js to include a link to the filename in the caption area so that when people click on it, they just get the raw image.

  620. Will H May 16th, 2006

    re: #606

    Mahesh,

    With the tooltips, did you by any chance get very slim blank boxes in Internet Explorer on the links without titles? That seems to be happening on mine.

    Thanks once again for everything!

    Will H

  621. Mahesh May 16th, 2006

    :-) Nice catch Will. I should’ve tested it on IE too. IE inserts blank title attributes into the DOM for elements which don’t have them. I’ve a fix for that.

    You need to change this :
    if (current[j].getAttribute(‘title’) == null) continue;

    To:
    if (current[j].getAttribute(‘title’) == null || current[j].getAttribute(‘title’) == “”) continue;

    This will catch blank title’s as well. I tried this on FF and IE and works fine.

    I noticed that IE shows the alt attribute in the enclosed IMG tag in its own little pop-up and that ends up on top of the Javasript tooltip.

  622. Anonymous May 16th, 2006

    hey guys?

    i am really stuck here.
    I don’t even know how to install Lightbox 2 onto my website
    Do i need to upload anything onto my computer?

    what do i do with the CSS file?

    and what do i with the .js files?

    can anyone help an amateur here?

  623. Anonymous May 16th, 2006

    ok..i uploaded

    effects.js
    lightbox.css
    lightbox.js
    prototype.js
    scriptaculous.js

    now what do i do with them?

    and im more confused than i thought at the html part

    i really need some help

  624. Anonymous May 16th, 2006

    It doesn’t work at all. The image opens up in a new page. What’s wrong?
    This is commonly caused by a conflict between JS scripts. Check your body tag and look for an onload attribute. Example:

    A quick fix to this problem is to append the initLightbox() to the onload attribute as so:

    where would i put this in?

  625. Will H May 16th, 2006

    re: #621

    Mahesh,

    You have once again you have fixed what I didn’t think could be solved, you are an amazing DOM scripter. I have one more question, and if you are unable to look at it, I understand completely. As you probably saw before on my page, I have implemented a style sheet switching feature into my new site. When you click on the colored squares (which are my links to the alternate style sheets), a blank tool tip box flashes on the left side of the page in Firefox (no issue in internet explorer). Any idea why?

    If you have time to look at it, I will be extremely greatful!

    Thanks so much,
    Will H

    PS: it’s the same link to my portfolio in our discussion in comment #586, I would rather not post the link again to prevent any spidering.

  626. Mahesh May 16th, 2006

    Re: 625

    Will,

    Your CSS Switcher is causing a new page load (atleast in Firefox) and when this happens, the sweetTitles code is re-initialized. The little red-box that flashes is the hidden DIV that sweetTitles creates during initialization. You may want to look at the CSS switching code. From what I have seen the alternatestyles lib that you are using should be doing the switching without an actual reload (http://24ways.org/examples/introducing-udasss/) .

    OR you could changing the order of some of the lines in sweetTitles.js
    Cut the line:
    document.getElementsByTagName(‘body’)[0].appendChild(this.tip);

    And paste it after this line:
    this.tip.style.visibility = ‘hidden’;

  627. uschzmet May 17th, 2006

    Hi all,

    on my site ( http://www.uschzmet.de ) i have installed this great script , but i wonder…

    in IE dont work the first Pic …. in code is it all right …
    Firefox works fine …

    Pics are loadet from a php-script with a mysql-query …

    any ideas why in IE the first pic is not working?

    …sorry for my bad english ;o) …

  628. Mahesh May 17th, 2006

    Re: #627
    uschzmet.

    <br<a href=”/bildergalerien/ansicht/as_NATURE-Orchis_1024×768.jpg” rel=”lightbox”><img src=”/bildergalerien/thumbs/tn_NATURE-Orchis_1024×768.jpg” ></a>&nbsp;&nbsp;

    Check the above line in your HTML Source. You are missing a ‘> ‘ for the BR tag. Firefox fixes the incorrect HTML for you. IE is not doing that.

  629. Will H May 17th, 2006

    Re: #626

    Mahesh,

    Thanks so much for all the help, your fix worked great!

    Will H

  630. Gomi May 17th, 2006

    Can somebody help with editing the JS (as recommended by #619 Rob) so it automatically generates a caption that is also a link to the original image file? This is to allow downloads.

    Salamat!

  631. Alexander May 18th, 2006

    Sorry, if you spoke about this, but i badly need “slideshow” function. Rotating images automatically in group, paused on hover above image.

  632. Mu Xu May 18th, 2006

    Great script, I have seen it in action on http://www.jogadgets.com and am trying very hard to get it to work on my site… but instead when I click on the thumb everything works the way it is supposed to but the image doesn’t show up. The url is http://www.xuland.com/index.php?option=com_content&task=view&id=12&Itemid=2 it would be greatly appreciated if someone can help me out. Thanks in advance

  633. Boney May 19th, 2006

    It is really fantastic. I am planning to implement this .
    Thanks for u r sharing.

  634. Al May 19th, 2006

    Wow weee this script is incredible.

    I found that if you use document relative links IE and Firefox behave differently.

    IE is relative to the current webpage. Firefox is relative to the location of the style sheet.

    Crayzee!!?!?!? So my stylesheet looks like this (which works a beaut):

    #lightbox{
    background-color:#eee;
    padding: 10px;
    border-bottom: 2px solid #666;
    border-right: 2px solid #666;
    }
    #lightboxDetails{
    font-size: 0.8em;
    padding-top: 0.4em;
    }
    #lightboxCaption{ float: left; }
    #keyboardMsg{ float: right; }
    #closeButton{ top: 5px; right: 5px; }

    #lightbox img{ border: none; clear: both;}
    #overlay img{ border: none; }

    #overlay{ background-image: url(‘../../../images/lightbox/overlay.png’); }

    * html #overlay{
    background-color: #333;
    back\ground-color: transparent;
    background-image: url(‘../../../images/lightbox/blank.gif’);
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=”images/lightbox/overlay.png”, sizingMethod=”scale”);
    }

    Why do I use this method? Because I’m integrating it into a script called CubeCart and all links are document relative. :O)

    Thanks Lokesh

  635. Boney May 20th, 2006

    I am sucessfully implemented this. Thanks Lokesh

    But i am having problem with image display. I want to display all the images in same size.
    How i can set all the images in same size ? Can u help me ?

  636. Razerz May 22nd, 2006

    @ #635
    The lightbox script doesn’t resize the pictures for you, you have to resize them manually before uploading them.

  637. Monte Chan May 22nd, 2006

    Do we have the liberty to modify the script to make the close button appear on the top left corner instead of the bottom right corner? It would be great if there is a parameter we can pass to the light box function to indicate where we want the close button.

  638. Hiro May 23rd, 2006

    Awesome script, next step is php based gallery, what do you think? :)

  639. Manon May 24th, 2006

    Omigod, you rock! I’m so lovin’ v2.0. I just made a donation and hope you’re getting all sorts of currency because this is just making all the sites I’m designing so chic! My clients think I’m a goddess. Anyway, thank you so much for this ubercool script!

  640. Steven May 24th, 2006

    I love this script:

    It’s simple, and neat

    One question : how can I make the shadow overlay in a hex color of my choice ?

    if you ever make version 3, could you be so nice to put in a timer function, so that you can set a delay in seconds between the images and just let them run ?

    great, no , Fantastic work.

    Your link will definitely be on my website. thx

  641. leovn May 24th, 2006

    Lightbox js 2.0 got a bug , when u click on the link to open image lightbox , while the loading image still visible ,try to click on the site under lightbox many times , u’ll see lightbox image not visible , the only one u see there was the white panel T_T

    And if u don’t see it , just open another image and click click , it’ll appear …

  642. leovn May 24th, 2006

    http://www.imagol.com/pics/leovn/35672/errorlightbox.JPG

  643. imx365 May 25th, 2006

    Thanks,Lokesh

    to http://imx365.mxblog.cn/category/official/12.htm

    he he~

  644. anouke May 25th, 2006

    #440 anouke

    It works! Be careful with the image extensions: i had .JPG instead of .jpg (ridiculous error…)

  645. mercury May 26th, 2006

    How to disable caption animation?

    in most cases it’s superfluous pretty effect.
    so it would be more user friendly to initially draw caption with the image container. any hints to implement this manually?

  646. jb May 26th, 2006

    I love your feature!!!
    Now I can show my photos on a way, who I wish it for a long time.

    But I tried it with the Internet Exploer for a MAC and it doesnt work. I never use this browser, I just tried it. JFI.

    Again: You did a great work.

  647. Yohan May 28th, 2006

    Hello,

    I try to use LightBox 2.0 (Very nice :-) into a web app project.
    I have seen that the LightBox is behind a that have an “overflow: auto” in CSS proprety.
    Normally, it should be in front of the scroll bar because of “z-index: 90;” CSS proprety for #overlay, and “z-index: 100;” for #lightbox.

    This bug appear only in Firefox 1.5 ; not in Safari 2.0 or IE.
    I don’t understand. Do you have a solution for that ? Thanks.

    PS: LigthBox is really a very great work, congratulations.

  648. Lewis May 28th, 2006

    #207 Olaf

    I have found that a simple fix is to just directly link to the effects.js file, instead of using the scriptaculous method.

    So, that begs an incredibly stupid question from me, and, well, what does scriptaculous.js actually do?

  649. Foxy May 29th, 2006

    I’ve posted a solution to the problem people where having loading images dynamically using AJAX or whatever and not getting Lightbox to notice them and display them:

    http://www.lokeshdhakar.com/forum/comments.php?DiscussionID=46

  650. Ana Jun 1st, 2006

    And here is my example site:
    http://www.obrazy.ovh.org

  651. Titan Jun 1st, 2006

    animated GIFs cause some javascript error in IE 6.x.

  652. Francis Jun 1st, 2006

    This is a beauty.

    I am in the process of creating a gallery page for my martial arts club website. This will be a stylish addition. When it is up-and-running, I will post a link here, and send a donation your way. Thanks for all your hardwork. It is truly impressive.

    But… a wee problem…

    In Firefox 1.5, if I look in the JavaScript console, I get the following two errors:

    Error: Unknown property ‘filter’. Declaration dropped.
    Source File: …/css/lightbox.css
    Line: 80
    ( filter:alpha(opacity=60); )

    Error: Error in parsing value for property ‘display’. Declaration dropped.
    Source File: …/css/lightbox.css
    Line: 95
    ( display: inline-block; )

    I get similar error messages when I use the light box on your website. However, everything looks fine.

    Are these just CSS attributes that Firefox doesn’t recognise? Does it matter?

    Sorry if this is a dumb question!

    (and I echo #162… you DO need a forum!)

    cheers
    F

  653. Charles Jun 2nd, 2006

    I am having a problem with the gallery within IE6.

    Within firefox the background covers the full width of the page, however within IE there is a small strip along the right side of the screen??

    http://www.atr-construction.com/siteWIP/projects/projects.htm

    Thanks,
    -Charles

  654. Charles Jun 2nd, 2006

    UPDATE!

    Found out that the reason for the backgound not covering the small stip along the right side had to do with reading the CSS from the page.

    Also noticed that the issues with the backgound not covering the complete image is due to screen resolution. If the image is larger then the site size it will not display the backgound to the bottom of the image container.

    Don’t know if that last paragraph made sence but if you view (http://www.atr-construction.com/siteWIP/projects/projects.htm) in IE with 800×600 resolution you will see what I mean.

    -Charles

  655. Bigredorange Jun 2nd, 2006

    I’m about out of hair now – tried everything to get Lightbox to work but no luck what so ever.

    Treid absolute paths, swapping the links to the js files around, butting the js files and css in the root directory along with the page that is using them – nothing.

    I would very much appreciate someone taking a quick look at http://www.bigredorange.co.uk/Lightbox.htm and telling me what I’m doing wrong.

    Thanks

    Steven

  656. Lewis Jun 3rd, 2006

    #655 Bigredorange

    I believe your problem is that ’scriptaculous.js’ should actually be ’scriptaculous.js?load=effects’.

  657. Bigredorange Jun 4th, 2006

    Tried it both ways (forgot to change it back) and still don’t get any joy.

    I’ve copied the exact files from the demo page onto my server and still can’t get any joy.

    If someone can tell me what I’m doing wrong, or tell me everything is correct so i just won’t work on my server it would be hugely appreciated.

    Steven

  658. Jon Jun 5th, 2006

    Hi,

    I have Lightbox 2.0 functioning, but I have a number of problems and would appreciate any advice (please bear in mind that I’m a novice!).

    Here’s an example page: http://www.filtereast.com/v2/en/lightbox_test.html

    I am looking for fixes for the following problems:

    1. I thought I’d fixed the problem in IE of a cut out line appearing around the side of the image clicked to move to ‘Next’ or ‘Previous’ image, bt this is still happening.

    2. I fixed the position of the container to 20px from the top of the page, but now if I have a lot of images vertically down a page the person looking at the page only sees the overlay – they need to scroll up the page to see the image which is fixed at the top of the page. Do I have to undo this positioning to have the image appear wherever on the screen the user happens to be? (Sorry – this problem isn’t demonstrated on the test page because all teh image are at the top of the page.)

    3. This one may be HTML related, but I’m not sure… When I use thumbnails instead of text links to open the lightbox the thumbnails have a colored link border despite the fact that I haven’t added image borders in Dreamweaver. I don’t want this link border to be visible.

    4. I fixed the issue of the overlay not covering all of the screen in IE by adding the suggested CSS hack (width: 100%;
    _width: 102%; /* read by IE only */). This fixed the width problem in IE, but now in FF the container box kicks to the left when images are resizing. I think these problems are related, but how can I fix them both?

    5. My image container doesn’t seem to be centered horizontally – the Ajax ‘Loading’ graphic is centered in the screenm but not in the container box.

    Thanks for any help.

    Jon

  659. Jon Jun 6th, 2006

    Re. #658

    All fixed except #3. This is probably the easiest to fix, but I just can’t figure it out. I want text links on the page, so hiding/deactivating links is not an option. I just want to lose the link borders around the thumbnails. Any ideas?

    Here’s another test page: http://www.filtereast.com/v2/en/lightbox_test2.html

    Thanks,

    Jon

  660. Elinor Jun 7th, 2006

    Hi,
    Lightbox is great! My only problem is that my pictures are really large, and I’m too lazy to go and size them all down. Is there some way I can set them to display at 50% or even just give the pixel sizes?
    Thanks,
    Elinor

  661. Xander Jun 7th, 2006

    Is there a way to have rounded corners with the image and data containers. I’ve been trying everything and I still can’t figure out how to do it. You guys help would be greatly appreciated.

  662. marselb | feuilleblanche.com Jun 7th, 2006

    thank u Lokesh 4 the lightbox JS,
    very good JS script !!! … look at him on our site ^^
    ~ marselb ~

  663. Elinor Jun 7th, 2006

    If anyone’s interested, I had a lot of pictures to post and wrote a bash shell to generate the html for a table of images linked to a lightbox grouping:

    #! /bin/sh

    echo -e “” > junk.htm
    j=0
    for i in $( ls *.jpg ); do
    if [ $j = 0 ]; then
    echo “” >> junk.htm
    else
    if [ 0 = `expr $j % 8` ]; then
    echo “” >> junk.htm
    fi
    fi
    j=`expr $j + 1`
    echo -e “image #”$j”” >> junk.htm
    done
    echo “” >> junk.htm

  664. Elinor Jun 7th, 2006

    oops… nevermind. It cut off the majority of that. Sorry.

  665. hewal Jun 8th, 2006

    thanks for the great and advanced technique,

  666. mike Jun 10th, 2006

    hi! its me again!

  667. RODvido Jun 11th, 2006

    love it… your amazing ;p my site certainly looks much better thanks to your code

  668. MrB Jun 12th, 2006

    I love what the lightbox script can do (and how it does it), thanks. For me I just needed to amended it slightly to display a Java applet to show my spherical panoramas. You can see my gallery in action here;

    http://panoramasunlimited.com/content/view/25/103/

    and then make a choice from the menu on the left. I have posted a more detailed list of the amendments and additions in the forum and can be found here;

    http://www.lokeshdhakar.com/forum/comments.php?DiscussionID=92

    Thanks again for your great work.

  669. cyberkiller Jun 12th, 2006

    this is very good job!

  670. Rory Jun 13th, 2006

    Hey, well done on the Lightbox script, its FAN-TASTIC! But i was wondering, what modification is http://www.eatmyshorts.com use, to enable it to play flash and videos, because i’d love to use it on my site cos its awesome.

  671. jeff Jun 15th, 2006

    hi guys;

    anybody has figured out how to put a water mark on an image

    thanks
    jeff

  672. Geoff Jun 18th, 2006

    @Rory
    I think Lightbox Gone Wild should be able to do it.
    http://particletree.com/features/lightbox-gone-wild/
    (It’s under Modifications on the Lightbox main page)

    Good job!

  673. Evilasio Jun 19th, 2006

    Hey, I’ve just started using LightBox on my blog, and everybody likethe new look of my photo pages. Thanks for the excellent plugin that you developed.

  674. Randall Jun 20th, 2006

    I’ve scanned through the comments, and I don’t think my question is there. The question is: Is there a way for it to pop up above a frame. The site that I am currently working on uses an iframe and the pics are in there. The LightBox effect appears in the frame. How can I make it bust out the frame?

  675. Mikey Jun 21st, 2006

    hey, great program! i’m having a similar problem to the poster above me, except i can’t even get the effect to apper in the iframe. but the effect works on the page itself seperate from my index. any sugjestions would be great, this is the begining stages of what i’m working on – http://www.masonictoledo.com/lisa -

    thanks
    mikey.

  676. Anthony Acosta Jun 22nd, 2006

    This is a great script. Excelent job. It was very clear and easy to inplement. If you would like to see where i used it, just visit http://www.1904restaurant.com and click on the gallery page.

    Thank you very much.

  677. MrB Jun 22nd, 2006

    It would seem that this lightbox script is starting to pop up everywhere. If you go to an ebuyer.com product page with images and click on a thumbnail guess who’s script is used?

    e.g.
    http://www.ebuyer.com/customer/products/index.html?rb=19988006189&action=c2hvd19wcm9kdWN0X2dhbGxlcnk=&product_uid=75516

    Thought the effect was familiar when it popped up!

  678. Kelley Jun 22nd, 2006

    Argh, I just realized I posted my question/problem on the wrong page. Can someone help me with this? :(

    http://www.lokeshdhakar.com/2006/01/10/lightbox-js-update/#comment-4353

  679. Alessandro Jun 23rd, 2006

    Looking to the comment #267, I would like to ask you just one more feature: image protection… as I’d seen outside in the web, the best solution for your actual architecture is a upper layer, over the real image, to put inside a transparent gif image… well… probably you could have a better idea but the feature will be really useful!

    Otherwise… I great job!

  680. Glenn Jun 23rd, 2006

    I’m a bit confused with the iframe tutorials through these comments. I want the script to load my pictures outside of the iframe because they are larger than the frame itself.

    I don’t know what else to say, thank you in advance!

  681. leif Jun 28th, 2006

    This look grat BUT you have to make it like a plug in ore somthing. I can not get it to work. PLEASE!!!

  682. bochecha Jul 1st, 2006

    Congratulations, this is just a really good script for photo viewing.

    I see only one problem : the css is not valid. I know it has already been posted a hundred times but this is the only thing missing in this wonderful script.

    Thanx a lot.

  683. John Wang Jul 1st, 2006

    Very nice! I used it for my Typo Theme Viewer: http://www.dev411.com/typo/themes .

    One issue is that while the animation is generated smoothly on Windows (Firefox and IE) it seems a bit jerky on Linux (CentOS 4.2 and Firefox 1.5.0.4). Is this a known issue?

    I was also wondering why a link on the lightbox image is disabled? I’d like clicking the image to close the lightbox. If I put a link around the image the link will be active immediately after the page loads (i.e. if I click the image right away, it closes), but if I wait the link gets disabled. Why is that happening?

  684. Paul van Roekel Jul 1st, 2006

    Thank you for creating this excellent Lightbox script. I’ve created a Picasa template using it. You can see it in action and download it from
    http://www.paulvanroekel.nl/picasa/ .

  685. R@ven Jul 1st, 2006

    Hi, I use lightbox in my gallery, but i thinking how edit code or css to div witch gif CLOSE and wich text in title in a href was on top, no on down in view.

  686. keith Jul 1st, 2006

    i think someone left and href open and made the whole lower half of this page a link…or something.

    anyway, i need help with iframes! i’ve read all of the posts and they seem fine if you only have a single lightbox link within an iframe content page. well, i was thinking/hoping to have multiple. anyone have any ideas on how this might be accomplished? also, the zip file that kaz posted is a dead link so i didn’t get to try that out.

    any help is appreciated!

  687. keith Jul 1st, 2006

    Oh yeah, email me if you have any ideas: keith@pixelassassin.com

  688. Anto Jul 2nd, 2006

    I tried everything…but it just doesn’t work for me.
    Link is http://www.antoniosarcina.eu/bubu.html

    Please, can someone help me?
    Thanks in advance

  689. keith Jul 2nd, 2006

    Anto, your image path must be wrong. The script is working, but no image is coming up. Check your image path/link.

  690. Bull3t Jul 3rd, 2006

    Hey, loving the script. Just wondered whether there is a way to make every link that goes to an image use the Lightbox, rather than typing in rel=”lightbox” to each and every one.

    Thanks in advance
    Bull3t

  691. kook Jul 3rd, 2006

    Pretty good, although I’m having a few problems with it.

    The script does, unfortunately, have its flaws. An example can be viewed on the home page of Lightbox 2.0 found at: http://www.lokeshdhakar.com/projects/lightbox2

    Disable stylesheets, then click an example. Nothing appears to happen. Infact, the image becomes viewable at the very bottom of the page, way out of the users view, of which 99.99% won’t have the incentive to scroll down, upon first clicking. I think behavior:url(“function.htc”) would be more appropriate to avoid this – http://www.w3.org/TR/becss#behavior

    As well, a tag above the code inserted at the bottom of the page, using #lightbox h* {display:none;} would be more appropriate, this enables developers to describe to the user what’s going on, and keep a some-what semantic document.

    The second issue is in IE6. I know, we all hate it, but it’s still widely used, so as a developer we must support it, for now …

    If you set a width to your body tag, 200px smaller than your available browsing space, you’ll notice that when using the script in IE, it doesn’t use the available space, it only uses the BODY space. It would be more ideal, if it would use the HTML space, another user above posted a ‘fix’ for this, but that ‘fix’ didn’t work, nor am I a good JS programmer, so I cannot fiddle with source code to tell the JS to use the specified HTML width (It’s assumed 100%, but it wouldn’t be so bad having to specify it to make the script work). This unfortunately creates the need for an unnecessary wrapper.

    It’s a good script, kudos and keep up the good work, but I’m, afraid I, and other developers bothered about user-experience can’t use it until it becomes a more accessible script.

  692. t-rude Jul 5th, 2006

    What a fascinating thing, and so simple to integrate. I’m amazed!

    The script does have a problem when the image name or folder name contains special characters, either in unencoded (äöü) or encoded (%E4%F6%FC) form. It doesn’t show the images then, but hangs with the “loading” icon.

  693. Patrick Jul 7th, 2006

    I needed the 2.02+ for it’s image resizing, because it made my pages go out of control every now and then. However I needed some edits. The resize was always just a little too big for the screen, and on pages where there was no scrollbar, it cause one to appear, so in lightbox.js I found

    var new_width = Math.floor(orig.w * ratio) ;
    var new_height = Math.floor(orig.h * ratio) ;

    and subtracted 20 from each total like this:

    var new_width = Math.floor((orig.w * ratio) – 20);
    var new_height = Math.floor((orig.h * ratio) – 20);

    which isn’t pretty but it worked. I also didn’t like the “enlarge” image, which clashed with the theme. I worked up these images to replace it:
    http://www.photorequipod.com/lightbox/images/zoom.gif
    http://www.photorequipod.com/lightbox/images/zoomlabel.gif

    but the lable one threw off the format, causing it to stick out to the side. I didn’t like it pushing the close button from its position as the most bottom right thing, so I had to change lightbox.css to say:

    #imageData #imageDetails{ width: 61%; float: left; text-align: left; }
    #imageData #caption{ font-weight: bold; }
    #imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
    #imageData #bottomNavZoom{ width: 79px; float: left; padding-bottom: 0.7em; } /* Added by Bas */
    #imageData #bottomNavClose{ width: 66px; float: right; padding-left:3px; padding-bottom: 0.7em; }

    I don’t know why 61% is the magic number. With 62% and above, and also without 3px padding, it cause the zoom image to shift when the mouse moved over it. This unfortunately forced some titles onto two lines where there was no need for a zoom button. Someone might fix that at somepoint, but that was the only configuration I could get to look and work decent.

    Patrick

  694. Frederic Jul 7th, 2006

    Goog job… very good job
    I used it for http://www.passionsansfrontieres.org/actions.html.

    In an ergonomic point of view, mostly user click on the thumbnail and do not spending time to read “nota” (the way you used keybord shortcuts). So why do not add a place to remind it … may be under the “image number”… at least the first image entry ?

    Best

  695. kook Jul 8th, 2006

    RE: #691

    After a bit of researching and talking with some other folks, it seems HTML Component and .htc isn’t the best way to go about it. Given that, the script could use a sort of ‘JumpToId(#overlay)’ when clicking a link, this won’t make a difference with styles on, but with them turned off, it will jump to the relevant place on the page.

    Add that and you’re game.

  696. Dan Jul 9th, 2006

    I love the lightbox, excellent from a usability point of view!!!

    I was wondering if there is a way I can customize lightbox as a way of letting the visitor to my site preview desktop wallpapers and then in the caption section offer links to the download of various sizes of the image, ie 800×600, 1024×768, etc.

    Thanks for your time.
    Dan

  697. Abdullah Jul 9th, 2006

    Really nice!

    Excellent, perfect: LightBox!

  698. Lloyd Borrett Jul 11th, 2006

    G’day,

    I’ve used Lightbox JS 2 successfully on a XHTML based web site. But now I’m trying to get it to work on a HTML Transitional one.

    But it just loads the image in a new page instead of running lightbox.

    See http://www.borrett.id.au/divelog/index.php?nr=27

    The page has the Milonic DHTML Menu on it, but even when I remove that it still doesn’t work.

    Any help most appreciated.

    Best Regards, Lloyd Borrett.

  699. Luca (Rome/Italy) Jul 11th, 2006

    Hi Lokesh,
    this script is wonderfull. Just a question, I have a site iframe based. If I use this script the photo is opened in the iframe. Is there a way to open in full screen vision and not in the iframe?
    Thanks.

  700. U-Nas Jul 13th, 2006

    To get rid of the IE “image toolbar” that pops up everytime you hover a picture, simply add this whitin your tags;

  701. U-Nas Jul 13th, 2006

    That’s strange.. The code is missing in my post #700. Posting the link instedad; http://designdelineations.com/design-notes/2005/06/13/how-to-hide-the-internet-explorer-image-toolbar/

  702. CSS Freak Jul 14th, 2006

    great script! love it.
    putting it in my tool box for use in future projects.

    do you allow mods? I have an idea for your script, but I kinda need to squish some other scripts in with the code.

  703. Anonymous Jul 16th, 2006

    Hello i cannot seem to get this program to work. I followed the directions exactly and i checked for JavaScript errors but it is still not showing up. It just takes me to another page that shows the enlarged image, can somebody please help?

  704. Anouk Jul 22nd, 2006

    Hello!

    I love the script! But…
    I’m jusing IFrames on my website. So if I want to open up a photo, the photo will open up in the IFrame. And I want the photo to open up in the whole window.

    I hope you know what I mean and wil help me out soon.

  705. Irydaly Jul 24th, 2006

    Hi,

    Nice code, but you need to add this,
    objLightboxImage.setAttribute(‘GALLERYIMG’, ‘false’);

    Goodday,

    IryDaly

  706. Gareth Jul 26th, 2006

    Hi, I’d 1st like to say thanks for lightbox, its a great tool that has finally burried the evil pop up window.

    Secondly if anyone is using this with .NET and the Controls, I suggest having a look at this asp.net forum post to save yourself a lot of frustration.

    http://forums.asp.net/thread/1316412.aspx

    G!

  707. DaMorg Jul 27th, 2006

    This is an excellent javascript slideshow! I have implemented it on one of the photo pages within my son’s high school football website. One problem though. I also use a javascript multi-level menu on the left side of the page for navigation. When I click on a photo, the Lightbox scripts run and display the photo correctly but the navigation menu does not darken like the rest of the page. It remains displayed like the photo. Any ideas on what I can do to make the menu darken with the rest of the page?

  708. betbest1 Jul 27th, 2006

    I am trying to use Lightbox2 on my page, and I get a JavaScript error:

    Error: Effect is not defined
    Source file: http://localhost/listingsites/js/lightbox.js
    Line: 320

    However, the provided index.html page works fine in the same folder, and I copied and pasted the CSS and JS file references.

  709. betbest1 Jul 27th, 2006

    Just to clarify, the error occurs when I click it, and then the image loads without using Lightbox.

  710. Kitten Kid Jul 27th, 2006

    What an incredible script! Everyone I show it to is dazzled by it. Can’t wait to get it up and working with my gallery…head and shoulders above everything else out there. Many many thanks for your work, Lokesh!

    http://kittens.sytes.org/

  711. gina Jul 31st, 2006

    I love the lightbox viewer…I have 3 galleries setup using it. There is just one problem. When you enter each gallery, it loads the last picture FIRST! I saw the instructions to make sure the Prev and Next buttons are in the right spot, but could someone please explain this a bit further?

    3. Check the CSS and make sure the referenced prev.gif and next.gif files are in the right location. Also, make sure the loading.gif and close.gif files as referenced near the top of the lightbox.js file are in the right location.

    I”m going to check again tonight, maybe i’m just stupid but anyone else having this problem?

  712. gleam Aug 1st, 2006

    nice code, but i have a little problem.
    why my flash file still show up ? i’ll check my code again.
    but i’m really thanksfull for the code

    this is how the code work
    http://www.gleamland.web.id/v2/portfolio.php

  713. Lokesh Aug 1st, 2006

    Awesome work dude!
    Really liked it a lot!! Thanks!

    http://lokesh.cjb.cc/

  714. ???? Aug 2nd, 2006

    perfect!

  715. Pello Aug 3rd, 2006

    Thank You So Much!
    Do-mo Arigato-Gozaimashita!

  716. tri Aug 3rd, 2006

    Am I the only one that has problem with both lightbox 1 and 2 working in Safari on a Mac? Both lightboxes versions work fine on IE and Firefox.

    I have googled all over the web, and none of these submodal scripts seem to work correctly with Safari. I’ve tried Lightbox 1-2, submodal, leightbox, thickbox, greybox, lightbox gone wild…

  717. Alan Aug 4th, 2006

    I have a small monitor, 1024×768, my images are way too big, is there anyway we can set a certain size that images can resize itself into?

  718. Jasper Aug 5th, 2006

    @#712 gleam

    Try putting the flash file in a div with a lower z-index.

  719. Jasper Aug 5th, 2006

    Hi all… i’m trying to change the script so it will also display “embedded video’s” from youtube.com.

    Not having any success… anybody here managed to insert other contents than images (with all the functions still working)????

  720. croc Aug 6th, 2006

    bloody cool~~~, you are the man~~~

  721. Anonymous Aug 8th, 2006

    This is some sweet effects… gonna use this on my site :)

  722. ismail ünal Aug 16th, 2006

    i put it in my site http://www.ismailunal.org and it’s working regularly. thank you so much.

  723. Hnieef Aug 20th, 2006

    Hey,
    how to use it with db.
    i just grab data from blob file and want to show using lightbox.
    i try but still fail.
    can u help me.

    thank

  724. Kevin Aug 20th, 2006

    I noticed when I click on a picture, regardless of browser window size, the scroll bars appear. I have my overflow set to hidden in my style sheet, so that people with larger screens won’t be bothered by ugly scroll bars, but the scroll bars automatically appear when a photo in Lightbox is activated. Any thoughts?

  725. Ryan Aug 21st, 2006

    Not sure why but my images are loading at the bottom of the page instead of in the middle of the browswer window. I have a gallery working perfectly on one server and that same page (same code) on a different server and it is jacking it up. Do some servers not accept the java script? Not sure why it would do that. Any Suggestions? Thanks for your help.

    jacked up page:
    http://www.ghosttownexplorer.com/photos2.html

    the working page:
    http://www.rynoesco.com/ghost/photos.html

    -Ryan
    rynoesco@yahoo.com

  726. boscohxy Aug 22nd, 2006

    good~~.

  727. Rajesh Aug 23rd, 2006

    I used on my wallpapers site http://www.freewallpapers.co.in

  728. Kim Aug 23rd, 2006

    wonderful script!

    i have a problem and a question though… i’ve modified the JS so that the prev and next links always show by doing what you said in #400, but because that kinda ruins the photo, how do i have them positioned at the very top? what do i do to the CSS to make that work?

    your help would be very very much appreciated! :-)

  729. kim Aug 24th, 2006

    oops, my question has already been answered previously. thank anyway! =)

  730. Jithuaravind Aug 25th, 2006

    Hi Lokesh..your enthusiasm really fetch results in such innovative stuffs for the community.
    good luck.
    Jithu
    http://www.jithuaravind.com

  731. ben www.xaluan.com news Aug 25th, 2006

    wwwaaaa i just used this on my cms with tiny mce .. i was hit a lot problems by using popup java inside tinymce.. and had rwitent bad code for it .. but now i can use this for my tiny with clean code .. love to your work .. thanks..

    and one things can you point me out .. i just need the loading progess smaller under the pictures or top conner of browsers .. ( maybe have next or prev images butons incase groups of pics) .. so my vister can keep reading while wait for the images loaded ..
    any advice pm me thank
    this code using on my site http://www.xaluan.com and other http://www.veryzoo.com
    regards

  732. ben www.xaluan.com news Aug 25th, 2006

    hi this me again.. i trying to make it drag and move but not sucess at all .. have you try that code???
    i have used the one at http://www.dynamicdrive.com/dynamicindex4/ then find for ‘Image Thumbnail Viewer’ that code work ok but can not put in my tinymce by it use the onclick function for images ( tinymce will take out single qual (‘) so that code can’t be work . then i use your one ..
    can you have look at that code then corect me to make that code work like your one use rel=”lightbox[roadtrip] not by (onclick) ..
    if you can make lightbox can move please tell me .. thanks..
    regards

    i think better i copy the code here:
    ———————————-
    Step 1: Add the following to the section of your page:

    Select All
    #showimage{ position:absolute; visibility:hidden; border: 1px solid gray; } #dragbar{ cursor: hand; cursor: pointer; background-color: #EFEFEF; min-width: 100px; /*NS6 style to overcome bug*/ } #dragbar #closetext{ font-weight: bold; margin-right: 1px; } /*********************************************** * Image Thumbnail viewer- © Dynamic Drive (www.dynamicdrive.com) * Last updated Sept 26th, 03′. This notice must stay intact for use * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ var ie=document.all var ns6=document.getElementById&&!document.all function ietruebody(){ return (document.compatMode && document.compatMode!=”BackCompat” && !window.opera)? document.documentElement : document.body } function enlarge(which, e, position, imgwidth, imgheight){ if (ie||ns6){ crossobj=document.getElementById? document.getElementById(“showimage”) : document.all.showimage if (position==”center”){ pgyoffset=ns6? parseInt(pageYOffset) : parseInt(ietruebody().scrollTop) horzpos=ns6? pageXOffset+window.innerWidth/2-imgwidth/2 : ietruebody().scrollLeft+ietruebody().clientWidth/2-imgwidth/2 vertpos=ns6? pgyoffset+window.innerHeight/2-imgheight/2 : pgyoffset+ietruebody().clientHeight/2-imgheight/2 if (window.opera && window.innerHeight) //compensate for Opera toolbar vertpos=pgyoffset+window.innerHeight/2-imgheight/2 vertpos=Math.max(pgyoffset, vertpos) } else{ var horzpos=ns6? pageXOffset+e.clientX : ietruebody().scrollLeft+event.clientX var vertpos=ns6? pageYOffset+e.clientY : ietruebody().scrollTop+event.clientY } crossobj.style.left=horzpos+”px” crossobj.style.top=vertpos+”px” crossobj.innerHTML=’Close ‘ crossobj.style.visibility=”visible” return false } else //if NOT IE 4+ or NS 6+, simply display image in full browser window return true } function closepreview(){ crossobj.style.visibility=”hidden” } function drag_drop(e){ if (ie&&dragapproved){ crossobj.style.left=tempx+event.clientX-offsetx+”px” crossobj.style.top=tempy+event.clientY-offsety+”px” } else if (ns6&&dragapproved){ crossobj.style.left=tempx+e.clientX-offsetx+”px” crossobj.style.top=tempy+e.clientY-offsety+”px” } return false } function initializedrag(e){ if (ie&&event.srcElement.id==”dragbar”||ns6&&e.target.id==”dragbar”){ offsetx=ie? event.clientX : e.clientX offsety=ie? event.clientY : e.clientY tempx=parseInt(crossobj.style.left) tempy=parseInt(crossobj.style.top) dragapproved=true document.onmousemove=drag_drop } } document.onmousedown=initializedrag document.onmouseup=new Function(“dragapproved=false”)

    Step 2: Add the following tag to your . This tag is used to contain the displayed images:

    Select All

    Step 3: Lastly, setup either thumbnail images or text links in which to load the actual images from (like in demo above). The code to add within the tag of your image thumbnail or text link is the following:

    onClick=”return enlarge(‘myimage.gif’,event, ‘center’, imagewidth, imageheight)”

    Enter the full path to the image in question for the first parameter. The final three parameters are optional (starting with “center”), and should only be set if you wish the enlarged image to be centered on the page.

    Here are two examples:



    Lemon Cake (centered)

    —————————–
    Note how the href also points to the image; such a setup allows non DHTML browsers to bypass the script, and load the image in its own browser window.
    ——————-

  733. Kevin B Aug 26th, 2006

    I’m having trouble getting LightBox to work with an AJAX div content changer. I’d love to flip through divs & divs of thumbnails and still keep Lightbox in tact. Any examples or suggestions?

  734. kj187 Aug 27th, 2006

    Hi,

    how can i turn off the effect ?

    greetz kj

  735. Rakesh Aug 29th, 2006

    I got following error while checking it in Opera 8.5 with Windows XP.
    It is working fine in IE and FF.

    Event thread: click
    Error:
    name: ReferenceError
    message: Statement on line 320: Reference to undefined variable: Effect
    Backtrace:
    Line 320 of linked script file://localhost/F:/HTML/scripts/lightbox.js
    new Effect.Appear(“overlay”, {duration : 0.2, from : 0, to : 0.8});
    Line 182 of linked script file://localhost/F:/HTML/scripts/lightbox.js
    myLightbox.start(this);
    return false;
    At unknown location
    [statement source code not available]

    please help to me solve this error.

  736. toothpick Aug 29th, 2006

    there semms to be a problem in the css with:

    #overlay{
    position: absolute;
    top: 0;
    left: 0;
    z-index: 90;
    width: 100%;
    height: 500px;
    background-color: #000;
    filter:alpha(opacity=60);
    -moz-opacity: 0.6;
    opacity: 0.6;
    }

    the last part, starting from “filter” is shown as wrong syntax in stylemaster and don´t seem to have an effect. overlay shows in 100% black instead of 60% alpha black.

  737. Edmund Aug 30th, 2006

    can anyone explain how to close the image with a ‘mouseout’ event (in addition to clicking the close button).

    thx

  738. kim Aug 30th, 2006

    alpha filter doesnt work in opera.

    i have a question, the prototype and effects scripts are pretty large. especially for dial-up users, it takes real long to load. the effects, maybe that cant be changed. but the prototype? couldnt you possibly implement a smaller library and put an update so that us JS dense people can use it?

    that would be really great!!

  739. kim Aug 30th, 2006

    how do you use the moo.fx thing with lightbox?

  740. patrykt.net Aug 31st, 2006

    awesome! of course if you have great photos ;)

  741. Rob Sep 1st, 2006

    Thanks that script is GREAT!! Love it

  742. Ballena Sep 2nd, 2006

    Lihgtbox ROCKS. Thanks A LOT to you for making things like this.

  743. Silvio Sep 3rd, 2006

    Hello, thanks for thi wunderfull tool. I like it, because i have some nice photos and i can take a simple gallery. All the best!

    Yoga Toskana

  744. kevin forrest Sep 5th, 2006

    hey guys thanks for the awsome program :) i love it almost as much as i like men. i might even make a light box about flamers like me. WINK WINK

    P.S. we shoiuld hook up sometime

  745. Luke Sep 6th, 2006

    First of all.. Great Script!

    Im using Iframes in my Sites and had the Problem that the Overlay apeared in the iframe not outside.

    So i played around a little bit and came up with this cute and top working code:

    1.) Main File (where your Iframe is in):

    —————————————
    function lBiFrame(href,title,rel) {
    var iframe = window.frames['iframe'];
    var alink = document.createElement(‘a’);
    alink.setAttribute(‘href’, href);
    alink.setAttribute(‘title’, title);
    alink.setAttribute(‘rel’, rel);
    myLightbox.start(alink);
    }

    var loaded = Array();
    function lBiFrameSet(href,title,rel) {
    if ( loaded[href] != 1 ) {
    var div = document.getElementById(‘lBiFrameSet’);
    var alink = document.createElement(‘a’);
    alink.setAttribute(‘href’, href);
    alink.setAttribute(‘title’, title);
    alink.setAttribute(‘rel’, rel);
    div.appendChild(alink);

    loaded[href] = 1;
    initLightbox();
    }
    }

    —————————————

    IFRAME:
    Use the normal syntax for the File link as explained here
    (http://www.lokeshdhakar.com/projects/lightbox2/)
    (Eventually the href needs the full Link eg. http…..)

    2.) Paste this code at the end of the script:

    —————————————
    var anchors = document.getElementsByTagName(‘a’);
    for (var i=0; i

  746. Luke Sep 6th, 2006

    Extension from previous Post:

    2.) Paste this code at the end of the script:

    —————————————
    var anchors = document.getElementsByTagName(‘a’);
    for (var i=0; i

  747. Anonymous Sep 6th, 2006

    Doesnt like the lesser sign …
    Replace !!(lesser sign)!!! in the for loop:

    2.) Paste this code at the end of the script:

    —————————————

    var anchors = document.getElementsByTagName(‘a’);
    for (var i=0; i !!!(lesser sign)!!! anchors.length; i++){
    var anchor = anchors[i];
    var relAttribute = String(anchor.getAttribute(‘rel’));

    if (anchor.getAttribute(‘href’) && (relAttribute.toLowerCase().match(‘lightbox’))) {
    anchor.onclick = function () {top.lBiFrame(this.href,this.title,this.rel); return false;}
    if ( anchor.getAttribute(‘rel’) != “lightbox” ) {
    top.lBiFrameSet(anchor.getAttribute(‘href’),anchor.getAttribute(‘title’),anchor.getAttribute(‘rel’));
    }
    }
    }
    —————————————

    Thats all!

    mfg

  748. Gus Sep 8th, 2006

    Hi there,

    really good work, Lokesh!

    Congratulations!

    Cheers!

  749. Online Casino Sep 8th, 2006

    Best games to play, best strategies to win. User ratings & reviews of top online casinos & pokers with largest bonuses & highest payouts.

  750. Spyros Sep 8th, 2006

    FOR Luke (iframe)

    Where do we have to paste the code:
    —————————————

    var anchors = document.getElementsByTagName(‘a’);
    for (var i=0; i !!!(lesser sign)!!! anchors.length; i++){
    var anchor = anchors[i];
    var relAttribute = String(anchor.getAttribute(‘rel’));

    if (anchor.getAttribute(‘href’) && (relAttribute.toLowerCase().match(‘lightbox’))) {
    anchor.onclick = function () {top.lBiFrame(this.href,this.title,this.rel); return false;}
    if ( anchor.getAttribute(‘rel’) != “lightbox” ) {
    top.lBiFrameSet(anchor.getAttribute(‘href’),anchor.getAttribute(‘title’),anchor.getAttribute(‘rel’));
    }
    }
    }
    —————————————

    PLEASE NAME THE FILE.

    Also…

    Do we have to paste:

    function lBiFrame (href,title,rel) {
    var iframe = window.frames['main'];
    var alink = document.createElement(‘a’);
    alink.setAttribute(‘href’, href);
    alink.setAttribute(‘title’, title);
    alink.setAttribute(‘rel’, rel);
    myLightbox.start(alink);
    }

    var loaded = Array();
    function lBiFrameSet (href,title,rel) {
    if ( loaded[href] != 1 ) {
    var div = document.getElementById(‘lBiFrameSet’);
    var alink = document.createElement(‘a’);
    alink.setAttribute(‘href’, href);
    alink.setAttribute(‘title’, title);
    alink.setAttribute(‘rel’, rel);
    div.appendChild(alink);

    loaded[href] = 1;
    initLightbox();
    }
    }

    before the in our file?
    Thanks in advance!

  751. elfenlied Sep 12th, 2006

    It’s so beautiful!
    But it can’t pass the w3c’s validating!

    This is the message:
    URI : http://www.lokeshdhakar.com/projects/lightbox2/css/lightbox.css

    * ?: 7 ??? : #lightbox

    ???? : line-height null – [empty string]
    * ?: 31 ??? : #loading

    ???? : line-height null – [empty string]
    * ?: 52 ??? : #prevLink:hover, #prevLink:visited:hover

    ???? : background ????????? : url(../images/prevlabel.gif) left 15% no-repeat
    * ?: 53 ??? : #nextLink:hover, #nextLink:visited:hover

    ???? : background ????????? : url(../images/nextlabel.gif) right 15% no-repeat
    * ?: 77 ??? : #overlay

    null – opacity=60)
    * ?: 78 ??? : #overlay

    null – -moz-opacity: 0.6;
    * ?: 83

    null – : 0.6; } .clearfix:after
    * ?: 91 ??? : .clearfix

    ???? : display inline-block ?????? display ? : inline-block

  752. Maarten Sep 12th, 2006

    Hi,

    I get the following error in lightbox 2 in the file Lightbox.js

    Does anyone have a solution? I get a nice page with all my folders images. When I click one I get an dark overlay but no new image.

    All paths to the files are checked and correct.

    ERROR:
    imageArray[imageNum] has no properties

    Error at line 343:

    while(imageArray[imageNum][0] != imageLink.getAttribute(‘href’)) { imageNum++;}

  753. Hani Sep 13th, 2006

    Lokesh, thank you for sharing such a great and useful script!

  754. Premasagar Sep 14th, 2006

    This is a fantastic piece of scripting. Well done.

    Just a suggestion for future versions… I think that all Lightbox element ids should have the prefix “lightbox_” or something similar. I already had an element with the id “loading” and the Lightbox CSS played havoc with it…

    http://www.dharmasphere.org

  755. MqHEm3Aj1B Sep 15th, 2006

    tfkJwpIvMOKh1Q uiuHpPQMkrCoHX 0unFh3OIAZVi

  756. tg Sep 16th, 2006

    I see that Associated Press is using your script now at http://hosted.ap.org

  757. Benoit Haurie Sep 22nd, 2006

    Yes, great script, thanks for sharing.

    Just to share a bit of my experience : I’ve had to modify it a bit, reproducing the way you hide “select” elements to also hide sIFR-replaced elements.
    There’s probably a more elegant way of doing it, as I have to specify the ID of the elements I want to hide…
    This was for a simple portfolio site, if you’re keeping tabs : http://www.carolinehaurie.com

    Cheers.

  758. r2tincan Sep 27th, 2006

    Hello,

    Does anyone know how to set it up so that lightbox has thumbnails show up when the image overlays, over the image? Much like the gallery program minishowcase http://www.frwrd.net/minishowcase/. I also like how they have their next and previous buttons OUTSIDE the picture area and on at all times.

    Does anyone know how to set up lightbox so it looks and functions like that? I think the functionality is greatly improved that way.

    I love this script! Thanks

  759. joerg Oct 5th, 2006

    Hi,
    Thank you for this great tool. I just want to share my experience, trying to create a portfolio with only one html-page. (plus one for other language)
    Once it is set up , which was possible for me being just a computeruser, it just runs and is easy to maintain! Friend of me and your forum helped me to modify it to the way it fits all my needs.

    Thanks again!
    Cheers ill have a drink now!

    http://www.designventures.de

  760. Vaguely Artistic Oct 5th, 2006

    After searching and searching I’ve finally found exactly what I’ve been looking for!

    I have hit one roadblock though, and I’m hoping someone can help me troubleshoot this. My test page works perfectly in FF & Safari on my Mac, but a friend just tested it at work on her PC in FF & IE and she gets the following errors:

    In FF:
    The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

    In IE she can’t see the page at all.

    Here’s a link: http://www.vaguelyartistic.com/canisterlb2.html

    I know that’s a fairly common browser error message but I’m stuck. Any suggestions are appreciated, thanks!

  761. Marcel Oct 5th, 2006

    @Vaguely Artistic

    If you had read the error message again you might have solved it yourself. IE says something like “there’s one blank missing”. It even tells you at which position and shows you the code line in question:
    …seven.html”title=”Collage …

  762. Vaguely Artistic Oct 5th, 2006

    @Marcel

    A-ha! When my “PC” friend looked at the page for me, she only sent me the snippet of text I mentioned in my first post — I didn’t realize there was more to that message. (But that explains why I couldn’t glean more info when I Googled it.)

    I’ll have her check it again and look into it further. Thanks for shedding some light on this :)

  763. bets Oct 6th, 2006

    I’m trying to wrap it into pmwiki (.php wiki tool which is html enabled):
    see this page: http://www.lmm-anne.net/pmwiki/pmwiki.php
    but no lightbox shows up. i’ve tried different versions of the script on the first three thumbnails. any suggestions?

  764. Brian and Eve Oct 10th, 2006

    Thank you for your LightBox. Now I need to revamp my whole photo gallery (http://www.behappytogether.com) which is previously built with Picasa.

  765. Dylaln Oct 12th, 2006

    Is there any way to get a series to auto play when the first image comes up – so the user doesn’t have to click next??

  766. Pozycjonowanie Oct 15th, 2006

    Awesome. I’m going to be using a modified lightbox for my wordpress blog. Thanks for making such a useful script!

    http://www.profesjonalna-reklama.pl

    thx

  767. candieiro Oct 16th, 2006

    #723 and #104

    To see an example of an automated LB example go to

    http://www.jeffshea.com/index1.php

    Using php it goes to the database and select the last 15 – or whatever limit you specify – pictures adds the title and caption in each of the thumbnails and organize it in a clean set of colums and rows. The only bug – that I’m still struggling with – is that the vertical oriented images are not centered in the container. Still looking into it.

    Since Lokesh has been so kind to share this wonderful script, I’m willing to post a couple tutorials that you can use to automate and display a gallery.

    The first one for those who already have a database and the second having a script reading your folders and organizing them into LB galleries. I’m a super busy developer, but if a few people are interested I’ll start writing the tutorials right away.

    And of course a donation has to made and I encourage everyone to give a little bit. These things take time and your clients will hug you for an effect like this. Let’s not forget about the man – Lokesh.

    Peace

  768. gswb Oct 17th, 2006

    Lightbox JS v2.02 ????swf????????????????????????????gswb@qq.com

  769. JoE Oct 19th, 2006

    Great script… the only down side, is that the script only loads when the page is fully loaded…

    anyone has any idea how to overcome that?

  770. chris Oct 19th, 2006

    hello, great script…

    I still don’t understand how to make it so the flash does not overlap.

    I read the post from the main site it directs you to, but there are so many replies with no clear answers (in the forum).

    can someone explain how to do this with SWFobject.

    thanks so much.

  771. Wit Oct 20th, 2006

    I reviwed file lightbox.js and found that it has functions hideSelectBoxes() & showSelectBoxes()
    to hide swf need rewrite these functions so:
    function showSelectBoxes(){
    selects = document.getElementsByTagName(“select”);
    for (i = 0; i != selects.length; i++) {
    selects[i].style.visibility = “visible”;
    }
    var objs = document.getElementsByTagName(“object”);
    for (i = 0; i != selects.length; i++) {
    objs[i].style.visibility = “visible”;
    }
    var embeds = document.getElementsByTagName(“embed”);
    for (i = 0; i != selects.length; i++) {
    embeds[i].style.visibility = “visible”;
    }
    }

    // —————————————————

    function hideSelectBoxes(){
    selects = document.getElementsByTagName(“select”);
    for (i = 0; i != selects.length; i++) {
    selects[i].style.visibility = “hidden”;
    }
    var objs = document.getElementsByTagName(“object”);
    for (i = 0; i != selects.length; i++) {
    objs[i].style.visibility = “hidden”;
    }
    var embeds = document.getElementsByTagName(“embed”);
    for (i = 0; i != selects.length; i++) {
    embeds[i].style.visibility = “hidden”;
    }
    }

    it must help

  772. Wit Oct 20th, 2006

    Sorry, below correct code
    function showSelectBoxes(){
    selects = document.getElementsByTagName(“select”);
    for (i = 0; i != selects.length; i++) {
    selects[i].style.visibility = “visible”;
    }
    var objs = document.getElementsByTagName(“object”);
    for (i = 0; i != objs.length; i++) {
    objs[i].style.visibility = “visible”;
    }
    var embeds = document.getElementsByTagName(“embed”);
    for (i = 0; i != embeds.length; i++) {
    embeds[i].style.visibility = “visible”;
    }
    }

    // —————————————————

    function hideSelectBoxes(){
    selects = document.getElementsByTagName(“select”);
    for (i = 0; i != selects.length; i++) {
    selects[i].style.visibility = “hidden”;
    }
    var objs = document.getElementsByTagName(“object”);
    for (i = 0; i != objs.length; i++) {
    objs[i].style.visibility = “hidden”;
    }
    var embeds = document.getElementsByTagName(“embed”);
    for (i = 0; i != embeds.length; i++) {
    embeds[i].style.visibility = “hidden”;
    }
    }

  773. chris Oct 20th, 2006

    thanks Wit, but where exactly do i copy/paste this?

    if you can email me the mod file to chrisp82@gmail.com thanks.

  774. chris Oct 20th, 2006

    actually all i had to do was add

    so.addParam(“wmode”,”transparent”);

    to the swfobject in the html.

    althought for some reason it cuts off the close button?

  775. Steve Oct 20th, 2006

    This is a great function. Thanks a lot for developing it.

    Is it possible to affect the caption text with a text-align property? I’ve tried justifying it, but it doesn’t take. Any idea as to why? The caption responds to font-weight commands, but not text-align … it’s kind of vexing.

    Still, though, this a really sweet tool that makes any slideshow look great. Kudos.

  776. SB Oct 21st, 2006

    Lightbox JS v2.0 is the very thing I am looking for!

    I checked out the script and it works. Very nice done.

    Thank you for sharing Lokesh!!!

    PS: My personal web site is currently under construction. Please be sure to visit in the near future.

  777. BB Oct 22nd, 2006

    Dude!!! You are Awesome!!! Simply Awesome!!!

  778. Ankur Oct 22nd, 2006

    Hi Lokesh Bhaia, this is Ankur. I was using Lightbox 2 on my site, and decided to tweak it a little when, lo and behold, “Lokesh Dhakar, huddletogether.com”. It took me a while to confirm that you’re actually Lokesh as in ‘cousin from America’, but then I had a look at Neha’s picture with you. To tell you the truth, I didn’t completely recognize you since I haven’t seen you for what, ten years?

    Great work on the Lightbox script, and I’ll see you in India in Dec / Jan?

  779. XBA Oct 22nd, 2006

    Hello, i’ve made a little revamping of your script for WordPress. My version allows automatic resize, a simple slideshow and a enhanced integration for the image legend. You can take a look one my website : http://www.john-noone.com/2006/10/22/lightbox/

    Cheers

  780. Kike Oct 22nd, 2006

    I’ve seen 2 problems:

    1º – This is not W3C CSS valid.
    2º – It’s doesn’t work properly in Linux.

    To solve the first problem, I’ve seen this website: http://diner.designsnack.com/viewtopic.php?id=58 in which there is a code that is w3c valid.

    To solve the 2º problem i don’t know how to do it, but it would be interesting to find a solution.

    After all, congratulations!!

    http://www.pantuflo.es/~gmonreal

  781. rayvolvez Oct 22nd, 2006

    using lightbox v2.. however.. i find tat lightbox v2 lightbox.css does not validate.. am i missing out on something?

  782. rayvolvez Oct 22nd, 2006

    missed out ur post..

    Thanks Kike..

    and most thanks to Lokesh!

    here’s my site : http://www.rayvolvez.com

  783. Dan Oct 23rd, 2006

    Great js application. Makes image viewing look smart and professional!

  784. madis Oct 23rd, 2006

    i have the sama problem what #397 Andrew had.
    (when the image is bigger than the window then overlay dosent cover that part which is below the wisable area in the first place)

    i dont know where to put this script what #397 Andrew told to fix the problem..
    is there any more solutions to this problem?

  785. HT Oct 23rd, 2006

    I have just started using the wonderful js script and i love it, its the best thing since sliced bread i think. I just have a quick question about how i would like to use the script.

    Q: Is there anyway to target a folder and then click through the images in that folder instead of adding the script/link to images on the webpage???

    A: Please would be interested to know if this can be done

    Thanks
    HT

  786. T1M4 Oct 24th, 2006

    Hi
    it’s a wonderful script! realy useful =)
    but i have some flash animation under the script and they are displayed over the pictures :/
    and i can’t edit the .swf because they are loaded from a sponsor server

    can you think i can fix this problem editing .js file ?

    thanx a lot for your work !

  787. Sava Oct 27th, 2006

    This is just the best script I found on the net congrats.

    I like my site to be simple with not to many images and lightbox really helped me hide them.

    I would have donated to you sincerely, but I am from Romania.

    Thank you,
    Sava – http://savasplace.com

  788. André Fiedler Oct 29th, 2006

    Very nice script!

    Will there be a mootools Version? In my opinion mootools is faster than prototype with script.aculo.us. ;o)

    Ciao André

  789. Malaysia Domain Name Nov 7th, 2006

    Thanks for the great tools! Will rather sacrifice W3C CSS validation for the beauty of it. ;p

    Regards,
    Malaysia Domain Name.com

  790. PhotoPierre Nov 8th, 2006

    This is very good topic. We think that it is very good invention.

  791. David Nov 8th, 2006

    I had the same problem (#397), with an image being bigger than the browser window.

    And I’ve fixed this temporarely by adding the following code at the end of the function updateNav:

    var arrayPageSize = getPageSize();
    Element.setHeight(‘overlay’, arrayPageSize[1]);

  792. Joe Nov 10th, 2006

    I love the script but I am having difficulty getting the caption and prev and next buttons to show up. I can’t seem to figure out how to get the scripts to point to the right directory. Here is what I have:

    #prevLink:hover, #prevLink:visited:hover { background: url(‘/images/lightbox/prevlabel.gif’) left 15% no-repeat; }
    #nextLink:hover, #nextLink:visited:hover { background: url(“/images/lightbox/nextlabel.gif”) right 15% no-repeat; }

    I know, I’m a novice so shoot me! :)

  793. Cephire Nov 11th, 2006

    Lokesh,
    I have developed a photo-album generating tool and I have used this lightbox as one layout. Hope that is ok with you.

    Joseph

  794. LordZoster Nov 12th, 2006

    in case nobody posted, i solved up the bug pointed in #154, #156, #159 etc., in IE overlay doesn’t cover the whole page.
    Simply add a CSS to .lightbox class:
    border: 0px solid;

  795. Thanathip Nov 13th, 2006

    It is a good design,the pretty script i ‘ve been seen before.

  796. vidman Nov 15th, 2006

    For those struggling to get the Lightbox to display ON TOP of a Flash object, this is the only real option that works cross browser without effecting your fixes for IE’s “click to activate” bug-
    http://blog.deconcept.com/swfobject/

    This tip was passed on to me by a friend so I figured I would do the right thing and pass it on as well.

  797. mvandani Nov 18th, 2006

    I’m using XSL to render an XML document that acts as a photo gallery. It seems that XSL takes issue with the load order of the scriptaculous files. When prototype is loaded before scriptaculous, the page refuses to render at all. When you load them in the reverse order, the page renders fine, but lightbox breaks. The images load in a new window. I have lightbox working on an HTML based page just fine, so I know everything is set up right.

    Anyone know of any work arounds?

    http://wam.umd.edu/~mvandani/gallery.xml
    http://lists.rubyonrails.org/pipermail/rails-spinoffs/2006-March/003158.html

  798. Ionut Nov 20th, 2006

    I have this problem,… also posted on a Forum!
    Can you help me with it…

    Check link plz: http://www.dynamicdrive.com/forums/showthread.php?t=15027

  799. stando2002 Nov 20th, 2006

    Hi,
    I’m using the Lightbox 2.02 in my gallery. It is great!
    But I found a bug in IE 7!
    When I scroll down through the page and then click on an image, the gray background does not appear or is not through the whole page! :(

  800. Emma Nov 20th, 2006

    Hi there! I’ve been seeing similar problems to mine solved around the forums, but I’m still a bit confused.

    On my lightbox, the “next” and “previous” buttons show up, however the loading animation and the “close” button do not. Here are two sites where lightbox is used on my site..

    http://students.mcad.edu/~etrithart/acrylic.html
    http://students.mcad.edu/~etrithart/digital.html

  801. Juan Nov 21st, 2006

    I just want to leave a THANK YOU!! here. Great script!

    greeting from Chile.

  802. lászló nagy Nov 21st, 2006

    man, you’re GREAT!!!!!!!!!!!!!!!!!!!

  803. Ross Nov 22nd, 2006

    Lightbox doesn’t work on IE 7 in Vista. I have to replace “return false;” in all instances of event handles with “event.returnValue=false;return false;”. I’m not sure if this is a bug in IE 7 in Vista.

  804. mattg Nov 22nd, 2006

    I love this script but I’ve run into a problem…

    It works great in FF2 but its not working at all in IE7…
    Heres where I’m using it: http://www.tic.orphanwebdesign.com/index.php?page=photos

    Ur script works fine on other sites in both IE7 and FF but I think on my site there might be something causing a conflict perhaps. It’d be greatly appreciated if you could help me out and tell me how to resolve this. Thanks!

  805. Justin Nov 27th, 2006

    I have a problem, my page loads, click on a link just opens the jpg in the browser. When I click “back” and then click the link everything works like it should. Any ideas on a work around for this?

  806. Justin Nov 28th, 2006

    Found my own fix… use parent.initLightbox() instead of initLightbox() when you have iframes (took me a while to figure this out since the images where appearing correctly when it would work).

  807. M. Nov 29th, 2006

    I do not want to register at the forum, so I am posting it here.

    This is my solution for the shadow overlay problem as in comment #421 (shadow overlay is too small when image is bigger than the site was):

    add this to end of function updateDetails in lightbox.js:
    var arrayPageSize = getPageSize();
    Element.setHeight(‘overlay’, arrayPageSize[1]);

    and this to #overlay in lightbox.css:
    padding-bottom: 75px;

    works fine for me

  808. Nat Dec 2nd, 2006

    I would post this in the forum, but i am not getting my registration conformation. No open registration being the issue it seems?

    anyway my question is that i code for a small government non-profit, and my website needs to be ADA compliant (ugh…), so i need to add code so that the image that appears has the caption also assigned to the alt tag.

    any help in doing this would be greatly appreciated.

  809. Johannes Dec 5th, 2006

    I just started playing around with this earlier today, and I found a quick way to display flash content in lightbox. A lot of posts seem to suggest that people have trouble with this, so in case anyone was interested…

    http://blog.deconcept.com/swfobject/

    Try using this. I included this javascript on my page, and made the following modifications in lightbox.js:

    Right under this line:
    “objImageContainer.appendChild(objLightboxImage);”
    , type this:
    var objFlashContent = document.createElement(“div”);
    objFlashContent.setAttribute(“id”,”flashcontent”);
    objImageContainer.appendChild(objFlashContent);

    And just below this line:
    “Element.setSrc(‘lightboxImage’, imageArray[activeImage][0]);”
    , add a call to some function that you will create:
    setFlashPlayer();

    Then at the bottom of lightbox.js, you can create the setFlashPlayer() function using the instructions at the link above. Something like this:

    function setFlashPlayer() {
    var so = new SWFObject(“movie.swf”, “mymovie”, “200″, “100″, “7″, “#336699″);
    so.addVariable(“variable1″, “value1″);
    so.write(“flashcontent”);
    }

    , where flashcontent is the div you named a few lines up.

    I hope this saves somebody some time.

  810. Johannes Dec 5th, 2006

    Also, in response to Nat, you can pass whatever attributes you want. The JavaScript doesn’t care what they are called. Whether or not this is good practice, or violates some standards, I don’t know. You just have to parse them and throw them into the array as you create it….
    ex:
    in your html:

    Then in your JS, add an extra anchor.getAttribute…
    imageArray.push(new Array(anchor.getAttribute(‘href’), anchor.getAttribute(‘title’), anchor.getAttribute(‘foo’)));

    , which you can then access by reading “imageArray[activeImage][2]“, and then you can use it any way you please.

  811. Preston Dec 8th, 2006

    I have users that try clicking the “BACK” button instead of the close button and thus are taken back to the previous page instead of simply closing the viewer. Two possible solutions. My preferred solution would be to 1) use js to change the nature of the back button to close the viewer, but keep the user on the current page. I’m not sure if that is possible. The second solution would be to 2) put a small text instruction ABOVE the image in the white border instructing the user to click the close button or anywhere outside of the photo to return to the page. Can the author or one of you other js gurus mangle the code to do one of the above? Thanks! (ABSOLUTELY LOVE THIS LIGHTBOX!)

  812. Boncye Dec 9th, 2006

    Hey,
    great job!
    Thanks, you are the best!

  813. dave Dec 9th, 2006

    Does anyone know how to automatically insert the rel=”lightbox” tag via third party blog tools like Ecto?

  814. Newby Dec 11th, 2006

    Hello,

    I was trying to use Lightbox Image Viewer 2.0 on my Geocities site (I’m going to make a site for my e-commerce class), but I haven’t been able to get it to work. If anyone could please help me figure out what I’m doing wrong, I would appreciate it. Here’s the link to where I’m trying to get it to work http://www.geocities.com/newby35143 (the picture of the baseball glove is suppose to use Lightbox). I downloaded the files from Dynamic Drive, but I don’t know exactly what I need to upload to Geocities and whatnot. It worked fine on my computer as an HTML file, but after uploading the text file and all of the files I downloaded with Lightbox, it didn’t work on my site. If you could help, I would really appreciate it, and email me if you can at harrycary1@yahoo.com

    Thanks

  815. Robert Dec 13th, 2006

    Hi Johannes,

    I tried using swfobject and adding your script to lightbox.js but can’t get an swf to load. Would you mind posting a working example, please?

    Thanks,
    NoBob.

  816. Kishore Asokan Dec 18th, 2006

    Its great Lokesh, I got it in my review section and its working good. Congrats

    Kishore

  817. NCJason Dec 18th, 2006

    Did anyone ever come up with a solid fix to open the image on top of an iframe? I have read the fixes that were posted but can not get them to work.

  818. Atlantis Dec 19th, 2006

    There is some problem with the new updated IE7.Lightbox doesn’t work……….

  819. Nadine Dec 20th, 2006

    I want to youe it in a flash slider, wich is generated by a xml file:

    10.jpg

    How do I change the url part into the picture links?

    LG
    Nadine

  820. Fath Dec 21st, 2006

    Hi there. Can you give me the css file of your Lightbox page? I like the style and the menu so much!

  821. Jason S Dec 31st, 2006

    I’ve implemented Lightbox on my website http://www.iterseminarii.com and I’ve noticed one quirk. Any characters with diacritics or accentation are messed up — changed to an Ã. Do you have any ideas as to why this is happening?

    regards,
    jason s.

    p.s.: I really love this project!

  822. Morten H Jan 1st, 2007

    I realy like the look of the lightbox and downloaded it and tryed it out with now luck. It does not work. I do not have a clue about scripts, but I tryed to follow the guideline given. Use Dreamweaver to edit the script and after some time I had to give up :-( I use Mac. But I guss it should not be any different from PC. Maybe there is a kind soul that could send me a finished version that I culd put in my web Photo gallery folder and try out.

  823. johan duflost Jan 2nd, 2007

    Really great library!!

    Just a little problem : pages using lightbox are not valid XHTML 1.1 because the character “[” is not allowed in the value of attribute “rel”. Is it possible to replace this character by another one?

  824. iis_hater Jan 3rd, 2007

    I’ve seen this asked many times above but no answer:

    What setting on a web server could be keeping this from working?

    I happen to be using IIS (outside my control, yes, I hate it too) and lightbox does nothing, just displays the image. On my PC desktop, unzipped right from the zipfile, the demo link on the index.html page works fine. On my PC desktop, served from the built-in version of IIS5 in Windows XP it works fine. However on my real web server, running IIS6 on Windows 2003, it does nothing. Just loads the image in the browser plain as can be.

    I’ve tried Google, I’ve searched here, I’ve looked through my server’s settings all to no avail and don’t know where to turn. I don’t want to give up on using lightbox though! Please, anyone who can help, email me at webmaster@jtcc.edu if you’ve come across this and solved it?

    TIA!

  825. betsubetsu Jan 5th, 2007

    how can i open a lightbox when someone loads my homepage?

  826. Charles Hall Jan 5th, 2007

    This is just a documentation suggestion. Your example does not show the thumbnail image html nor does it mention that you have to make your own thumbnails.

    This is readily apparent when you get into it or do a View Source on your documentation page, but it was quite misleading to my non-techie users who thought this would solve all their problems.

    The visual effect is VERY slick, I’m impressed that you can do this in JS!

  827. Jan 5th, 2007

    Hi,

    I try to load the lightbox from a swf button… without succes !
    Does anybody have a “stop by step” documentation that could help me ?

    love lightbox !

  828. Alexander Jan 6th, 2007

    Man this thing looks pretty tight. Im definitely using this for my image gallery! And it so easy to customize the look and feel!

  829. Melissa Jan 7th, 2007

    I downloaded and it works :D but only in IE.
    Do you know why it doesn’t work for me on Firefox?

    http://hollywoodheat.org/designs.html

  830. Jay Jan 8th, 2007

    Help!

    the overlay doesn’t work in IE but it does in FF
    & the “blank image” is stretched across the browser but the height is just perfect for both IE and FF
    What do i do? =(

  831. Jos Jan 9th, 2007

    Having problems with Lightbox in combination with iFrames? Try using LYTEBOX instead: http://www.dolem.com/lytebox/index.htm

    Seems to be the ideal solution… for using lightbox in combination with iframes!

  832. Suomi Jan 16th, 2007

    Click to close !

    If you want to close the lightbox by clicking outside image (wherever you want)

    1. Use prototype.js v1.5 & Lightbox v2
    2. Find updateNav function
    3. Add these lines at the end of updateNav function :

    Position.absolutize(‘imageDataContainer’);
    Position.absolutize(‘outerImageContainer’);
    Element.setWidth(‘lightbox’, 1);

    Thank you for this nice job lokesh.

  833. Suomi Jan 16th, 2007

    Click to close part2 :

    Need a step 4 :

    Find resizeImageContainer function and add at the beginning :

    $(‘lightbox’).style.width = ‘100%’;
    Position.relativize(‘imageDataContainer’);
    Position.relativize(‘outerImageContainer’);

  834. tboggi Jan 20th, 2007

    Hello,

    I have a problem with the layout of lightbox.

    please visit my site: http://www.bsv-bruchmachtersen.de and klick on the randompic at the sidbar and see the problem.

    kind regards
    tboggi

  835. Brad Steiner Jan 22nd, 2007

    Thanks for the superb scripts. They are ideal for my image gallery at http://www.bradsteiner.com. Can’t wait to see your new projects.

  836. Knarfishness Jan 24th, 2007

    everytime i show people my photo page, they are impressed, thanks to lightbox. seriously, good stuff, man.

    http://www.radford.edu/~favery/pics.html

  837. doz_r Jan 28th, 2007

    Not sure if this has been discussed before.

    Here’s how to get HTML content to display below each image:

    Open up lightbox.js, scroll down to the updateDetails() function, then change
    Element.setInnerHTML( ‘caption’, imageArray[activeImage][1]);
    to
    Element.setInnerHTML( ‘caption’, $(imageArray[activeImage][1]).innerHTML);

    Now, create multiple div elements in your page with CSS style set to display:none; and set the title of the anchor to the id of this div.

    e.g.

    This is some content that has a hyperlink inside it, with strong, italic or anything else.

    With this (rather kludgy) hack, you’ll the content of the div element to display below each image.

  838. Mentalic Jan 29th, 2007

    Here is interestnig question.

    Can you call for Lightbox effect from FLASH? For example, in FLASH you have a scrolling bar with thumbnails of images; click on one of thumbnails and voila > large image with deemed bacground.

    Is it possible?

    Thx.

  839. funster Jan 31st, 2007

    First of all I’d like to join in: Great work!

    I found this problem from the Lightbox 1-Blog (No. 204) unsolved :

    does anyone know if there is a way to have it autopop an image from a link.
    so like if i have a page of images and i want to send someone a link to the page but have it auto pop up the image in the lightbox.
    ie
    http://www.domain.com/index.php?IMG_01.jpg

    or something to that affect.
    so it takes them to the page of images and auto shows them that image large.

    So this is my problem as well. Is there a solution or a hint out there?

    Thanks folks!

  840. Xavi Feb 1st, 2007

    Oh my, this is cool! how to i use this on blogspot if i wish to use lightbox to show my pictures?

  841. Nate Feb 5th, 2007

    If I use this on a commercial site, do I need to display a link to you or show the user any information to give you credit? Or, is it just in the js code that you require credit?

    By the way, this is a very awesome script!

  842. víctor Feb 5th, 2007

    Thanks For this invaluable script!
    Please, could you answer a simple question?
    What´s the font name you used to type “close”, “next” & “prev” buttons?
    If you want, send me an e-mail with the info!
    My e-mail adress is: torkaeriushotmail.com

  843. pablo Feb 8th, 2007

    i am using wordpress theme called Bare that uses php
    and the index is also index.php

    i have trouble placing lightbox files into the right place
    and linking stylesheet.css with lightbox.css

    how would u use LBox if my wordpress theme uses php?

    thanks

  844. jeff j Feb 8th, 2007

    FANTASTIC! I’m a complete web building and scripting noob, but your instructions are great. Works nicely in every browser. Thanks much!

  845. ?? Feb 12th, 2007

    ????????????js????

  846. Sophie Feb 12th, 2007

    Posted yesterday but my message has disappeared. I have linked my captions to external sites. I’m trying to find a way to open them in a new window. Tried to put the “target” command in the caption but it doesn’t work. Anyone has any idea how that can be done?

    Thanks

  847. Niko Feb 15th, 2007

    Just wanted to thank for sharing your amazing script! Youre the man

  848. Mr.Benjamin Feb 16th, 2007

    From:Mr.Benjamin
    #67 Cresent Close,
    Lynnwood Road
    Hatfield Pretoria
    Gauteng, South Africa.

    {INTERNATIONAL HERITAGE TRANSACTION}
    {One Hundred & Seventy Two Million Six Hundred And
    Fifty Four Thousand United State Dollars}
    {(RE: TRANSFER OF ($172,654,000.00 USD}
    {BUSINESS OPPORTUNITY/YOUR ASSISTANCE IS NEEDED}

    Dear Sir/Madam!!

    I sincerely ask for forgiveness for I know this may seem like a complete intrusion to your privacy but right about now this is my option of communication. This mail might come to you as a surprise and the temptation to ignore it as unserious could come into your mind; but please consider it a divine wish and accept it with a deep sense of humility.

    I am aware that this is certainly an unconventional approach to starting a relationship. I am Mr.Benjamin,the personal account officer to the great late diseased who has an account in one of the top banks here in South Africa. The account was opened in 2001 and he died in 2004 without a written or oral WILL and since 2004 nobody has operated on this account again hence the money is floating and if I do not remit this money out urgently it will be forfeited for nothing and Govt. of South Africa will confiscate the funds for their personal use which I personally don’t want such incident to happen being that this is a great opportunity for me.

    My contact is for you to please assist me to transfer the fund ($172,654,000.00 USD) One Hundred & Seventy Two Million Six Hundred And Fifty Four Thousand United State Dollars from a Cooperate Bank here in South Africa to an oversea account. First, I must solicit your strictest confidence in this transaction. This is by virtue of its nature as being utterly confidential. I am sure and have confidence of your ability and reliability to prosecute a transaction of this great magnitude. I solicit your assistance to enable us transfer the said amount into your safe account for onward investment.

    You can either provide us with an existing account or to set up a new Bank account immediately to receive this money, even an empty a/c can serve to receive this money, as long as you will remain honest to me till the end of this important business trusting in you and believing that you will never let me down either now or in future because this business is my life. The owner of this account is a foreigner and no other person knows about this account or anything concerning it, the account has no other beneficiary and until his death he was the manager of the company. My investigation through the National immigration department & Ministries here proved to me as well that he was single as at the time of his entry into the Republic of South Africa. The amount in this account is USD ($172,654,000.00 USD) One Hundred & Seventy Two Million Six Hundred And Fifty Four Thousand United State Dollars only.

    As a matter of fact, I have decided to transfer this fund abroad for investment. Your assistance as a foreigner is necessary because the management of the bank will welcome any foreigner who has correct information to this account which I will give to you immediately, if you are interested to do this business with me. There is no risk in this business. With my position and my personal contact with the manager of the bank, the money can be transferred to any account you can provide with assurance that this money will be intact pending our physical arrival in your country for sharing. We will start the first transfer with Fifty million [$50,000.000]. Upon successful transfer without any disappointment from your side, we shall re-apply for the payment of the remaining balance of $122,654,000.00 Million to your account. I am only contacting you as a foreigner because this money cannot be approved to a local person here, but can only be approved to any foreigner who has the correct information of the account, which I will provide for you. So you should provide me with your correct account details where you will like the fund to be transferred to, or you can set up a new account for the transfer even an empty account is ok. At the conclusion of the transfer you will take 45%, 6% will be for any expenses both parties incurred in the process of this business and the remaining 49% will be for me. As soon as I hear from you and upon your strong assurance that you will not let me down once the fund goes into your account I will then start the processing of the transfer of the fund to your account without further delay. If you are interested, please forward the following information as below:

    {1} Your Name/company’s name and full address,
    {2} Bank Name:…………
    {3} Bank Address…
    {4} Account No:………
    {5} Swift Code…{if any}
    {6} Account Holder’s Name: ……….
    {7} Your telephone Nos.both Home, Office & Cell/Mobile and fax
    Numbers…
    {8} Your Occupation
    {9} Your Valid ID

    Upon the receipt of the above details, payment will be activated by the feeding of your data into payment system, followed by a signal that will be sent to the paying bank to remit funds into your nominated bank account within 5 official working days of receipt of the above information. Contact me urgently via email privately for further details: {my_save2006@yahoo.co.uk}

    Thanks.

    Best Regards

  849. Vikas Feb 19th, 2007

    I was facing the problem in Internet Explorer related to flash object. Due to flash object, image was clipped. So i have added following code to line 651 (in side function showSelectBoxes())

    flashobj = document.getElementsByTagName(“object”);
    for (i = 0; i != flashobj.length; i++) {
    flashobj[i].style.visibility = “visible”;
    }

    Similarly… (in side function hideSelectBoxes())

    flashobj = document.getElementsByTagName(“object”);
    for (i = 0; i != flashobj.length; i++) {
    flashobj [i].style.visibility = “hidden”;
    }

    Regards,
    Vikas Bhagwagar

    http://www.vikaskbh.com

  850. j-nny Feb 22nd, 2007

    thank you very much for this really really great script

  851. Daniel Feb 23rd, 2007

    That’s a great example for the web, Thanks, I like this. Regards from Vallenar Chile.

  852. Florin Feb 23rd, 2007

    There is a problem:
    image #1
    Is not XHTML 1.1 valid, because of the [ ] … Where can we change this?

    W3 message: character “[” is not allowed in the value of attribute “rel”.

  853. karmae Feb 24th, 2007

    like it :D thx. ö.O

  854. João Melo Feb 25th, 2007

    It is very good, it forgives my English, it has permission to implement in my site? it is very better of the one than to use swf, with a time I make the donation. It only opens images? how I make to open an equal form to one I register in cadastre? My site: joaofmelo.com

  855. Tiger2 Feb 26th, 2007

    Also love the project.
    Q: Is there a way to display all the links in a set once the lightbox is opened? I’d really like my users to be able to skip back and forward as well as use the prev/next links.

    e.g.
    Picture Title
    (jump to) 1 2 3 4 5 6 7 8 9 10
    Image 1 of 10

  856. nev Feb 26th, 2007

    Lightbox is great! My implementation of it shows one strange little error however – in IE6/Win only: everything works, except that, when you’ve clicked and got the lightbox picture, when the mouse is moved, a select menu form that’s at the top of the page “behind” suddenly pops into view, into the otherwise dark lightbox. Any ideas or hunches what I might be able to tweak to stop this? Thank you!

  857. Chris Feb 27th, 2007

    Hello, first of all I want to thank you for this great script!!

    I saw that this question was asked before, but not answered.

    Is there a way to break out of a iframe, normally you can point the target to _top, but that isn’t working.

    Please help.

  858. Zeeshan Feb 27th, 2007

    Hi All,

    Can any one tell me as to how to move the lightbox from its postion. I wanna move my light box a bit lower. Thanks in advance.

  859. Zeeshan Feb 27th, 2007

    Hi All,

    Can any one tell me as to how to move the lightbox from its postion. I wanna move my light box a bit lower. Thanks in advance.

  860. bill Feb 28th, 2007

    I have been playing around with this awesome scipt and have created a ColdFusion mini app that integrates this Lightbox script. I’m calling it LightboxCF. Thanks for the inspiration Lokesh.

    LightboxCF Features…
    -Traverses your photo directory automatically
    -Creates links to your albums (folder/directory names)
    -Presents the photos organized alphabetically
    -Displays image resolution
    -Displays Image name
    -Displays File Size
    -Built in ability for hit counters for each album
    -Added ability to add comments to each photo
    -Quick permalink ability
    -Quick link to download images locally
    -Extra features added to Lightbox popup too
    -No backend database required

    What’s next…?
    -I’m working on adding bookmark capability

    Much more to come…

    Test link: http://www.billandmiss.com/blog/albums/

  861. nev Mar 1st, 2007

    It seems that a fix for the problem I posted in #856 is as follows:

    Quote: “Stop select elements from showing though: place an iframe element between the popup and what is showing through from below. The iframe should be the same size as the popup and positioned with a lower z-index than the popup. The iframe seems to be an impenetrable element so nothing shows through.”
    (unquote)

    Can someone tell me how I actually do this?? Pleeease?!!

  862. windsweptskulls Mar 5th, 2007

    has anyone put there managed to write a hack to make lightbox work in Firefox OSX? i keep having a problem where the scrollbars on my page show over the top of the photo content displayed using lightbox. is this common place? let me know folks…

    cheers,
    miles

  863. ie Wilk Mar 5th, 2007

    How to edit lightbox.js and lightbox.css to cater for center vertical and horizontal alignment?

  864. jimjimson Mar 7th, 2007

    Thanks for #832, #833, suomi!

  865. Mystie Mar 8th, 2007

    Great work!

    Is it possible to get the transformation of the first start (or different img size) for every start of the lightbox? If I close the Lightbox and click on another picture (same size) it should fade in like it does before…

  866. mansour Mar 9th, 2007

    Hello,
    I used your great script on my page and combined it with ajaxtabscontent script from dynamicdrive.com! (http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm)
    I have a problem with this.
    Can i ask you guys take a look at my demo site and help me resolve this issue!
    http://www.kimiamedia.org
    problem description:
    On the first page of my site this gallery script works well, but when i click on a link in the right menu (page.php?pid=XXX) the script does NOT work!
    Thanks

  867. Venkat Mar 10th, 2007

    Hi

    shall we use this for our website http://www.sgdnetworks.com ? if yes, do we need to have any permission from the author?

    REgards
    Venkat

  868. derdan Mar 10th, 2007

    Hallo,
    the second Version ist really great, but where is the little CLOSE-Button in the top-right corner? can I get it back like in the version 1?

    Greats and thankts for your work!

    Derdan

  869. kolli Mar 11th, 2007

    http://auto8512.narod.ru

  870. Chris Mar 11th, 2007

    I would be SOOO awesome to make this script XHTML 1.1 compatible since right now it is not (as mentioned previously already)…

    thanks in advance
    fix this mistake and you got a nice donation coming
    thanks again

  871. www.sohbanet.com Mar 11th, 2007

    Its cool
    http://www.sohbanet.com
    http://www.sohbanet.com/vb
    http://www.sohbanet.com/tech

  872. Roberto Mar 22nd, 2007

    You script is very beautiful and I have used this many times…
    Now I’ve a problem with multiple images…

    I write:

    *******************************************************************************************************************************


    BUT IMAGE SHOW NOT IN ORDER !!!!
    WHY??

    Can you resolve my problem ??

    THANKS

  873. James Mar 22nd, 2007

    Nice script

    http://www.joinsky.net

  874. manuel Mar 23rd, 2007

    Hello people help me on how to save/download images when you righclick the big images at the mozilla firefox browser.

    email me at mansite2003@yahoo.com

  875. darkxiiindp Mar 25th, 2007

    Great! Exactly what I need. Thanks you.

  876. Jan Mar 28th, 2007

    Hey there, nice work!

    one question: if your original Webpage has a pulldown menu and u trigger lightbox, then the pulldown is on top of the lightbox-layer in IE6. Whats the best way to fix this? via CSS => visibility:hidden;

    thx.

  877. Jan Mar 28th, 2007

    btw. the pulldown menu ist in a iframe. i doesnt seem to be a problem if the pulldown is in a regular html-page, is it?

  878. Clement Young Mar 28th, 2007

    I’ve try it on y home page, it works!! But when I use it with other JS effect, it doesn’t work anymore, even I added onload=”initLightbox()” into the body. Please give me a hand! thx

  879. Jav Apr 6th, 2007

    How to add AdbritePic script into Lightbox image?

  880. Mann Apr 23rd, 2007

    I think there is a problem with struts implementation can u tell me how to use light box functionality

    rgds
    mann

  881. Max Smith Apr 30th, 2007

    Nice script! Thanks!

    http://www.download-movies.tv

  882. LightboxSupporter May 7th, 2007

    Lokesh,

    I feel so gutted.

    Look at this : http://www.tomodo.net/PDOX.php

    Read this line : “The website has simple pages and is the first to make use of the ‘Lightbox’ image gallery. (This also ended up being used here)”

    It reads as if the guy did the Lightbox gallery, meaning he programmed it for his client. This is discrediting your effort!

    I really feel gutted when I saw this.

    Regards,
    LightboxSupporter

  883. Matthew May 7th, 2007

    @833, I am feeling the same thing… it really really sucks.

    Wouldn’t this site be the first to use it. haha

    Matt

  884. Web design site May 12th, 2007

    Good article!
    Thanks!

  885. einemillioneurohomepage May 20th, 2007

    I think these blog is really useful for new comers and Excellent resource list.
    It´s a very interesting Blog and simple answer of many questions.
    Keep up the good work!
    Thanks it helps me a lot…

    Onlineshop

  886. About Batik Picture May 20th, 2007

    I am really inspired by your work!
    Thank you.

    http://www.batikpicture.com

  887. BrnLng May 26th, 2007

    To all the doubts about the character “[" and "]” in the rel attribute of links:

    There is no need in the current code that “locks” use-mode to the form documented – I’ve recently changed the rel of some images here to something from “lightbox[group]” to “lightbox-group”.

    the code is awesome already so this little hack makes the pages valid XHTML 1.1 AND does not nees any code changing on lightbox.

    I’m currently very glad of the package and planning on a donation, as soon as I can. Thanks for it!

  888. Tapeten Jun 9th, 2007

    Great and excellent article t’s realy helpful. Thanks again.
    Wow. Very impressive.

  889. Handwerkersoftware Jun 18th, 2007

    Thanks for very interesting article. btw. I really enjoyed reading all of your posts. It’s interesting to read ideas, and observations from someone else’s point of view… makes you think more. I think these blog is really useful for new comers and Excellent resource list.
    It´s a very interesting Blog and simple answer of many questions.

  890. Handwerkersoftware Jun 18th, 2007

    Thanks for very interesting article. btw. I really enjoyed reading all of your posts. It’s interesting to read ideas, and observations from someone else’s point of view… makes you think more. I think these blog is really useful for new comers and Excellent resource list.
    It´s a very interesting Blog and simple answer of many questions.

  891. Handwerkersoftware Jun 18th, 2007

    good site……..

  892. Anand Jun 19th, 2007

    Very nice, made my site more attractive
    thank a lot for sharing ur knowledge

  893. Patrick Jun 25th, 2007

    Great work!

    I’ll use this right away on my site. I came here from the link on bluevoda website builder!

    I just notice that when I click the close button on v2.03, There appears to be some scroll bar, so I have to click it twice.

    Once again, great work!

  894. m rhodes Jun 29th, 2007

    Cool website! Keep up the great work. Many thanks. Thanks!

  895. andre van der Sandt Oct 24th, 2007

    Hello!

    Awesome effect Ive just beens struggling working with it over other browsers Ive been designing the website in Dreamweaver and testing it in Safari, and it looks great in safari but as soon as i go to fire fox or internet explorer it looks like crap and the images have this black box around them and and and and! What could you suggest to do?

  896. Chad Jan 23rd, 2008

    I’m surprised this hasn’t been addressed or brought up more than once with the prevalence of Vista now, but…

    I bought a new laptop with Vista and all sites using Lightbox I’ve noticed – including the main Huddletogether website for the Lightbox download – break (ie, opens straight to new browser window instead of Javascript effect) in IE7 for Vista.

    I see changing “event.returnValue=false;return false;” in all instances fixes the problem for IE but now Firefox breaks!

    Any ideas???

  897. Tanja Feb 27th, 2008

    First of all – great work. The lightbox tool is really great and many thanks for giving the opportunity to use it for free.

    It also works fine for me – I just have this problem I cannot fix:

    when starting the image gallery and then resizing the browser window (making it wider/larger) – the overlay does not automatically resize. The width of the overlay stays the same – as the “former” browser size…and a not so nice edge appears…..

    Is there a way to fix that?

  898. james Mar 5th, 2008

    Hi i’m using the lightbox inside a div with a scroll bar. the entire gallery works fine on pc but on my mac in firefox the scroll bars are appearing above the image once you have clicked through to the larger version can anyone help?

  899. Foxy Mar 9th, 2008

    Hi
    is there any way that the “alt” tag can be used instead of the “title” tag for the Caption?
    I have 100’s of photos on my site all nicely given alt text tags and these would be great to use as the caption as well.
    Appreciate any ideas.

  900. Marx. Apr 1st, 2008

    Hi guys,

    is there any way to diplay the picture using lightbox in a body tag onload?
    I need to display the picture in a lightbox screen as soon as you visit the site. I’ll use it for important images, visitors have to see it before they can browse the site. Thanx

  901. chipsy May 4th, 2008

    Great work!! thanks

  902. ripe May 13th, 2008

    HI.

    When i roll over thumbnail before activating the lightbox my title( which i use for description text) pops up in yellow box. can anybody be so kind to tell me how to get rid of this pop up.

    Thank you

  903. nansaidh May 25th, 2008

    Okay – I think I’ve looked all over the web and still can’t implement a solution to the frames issue. Don’t stop reading in disgust… stay with me a minute, please.

    I just use plain old frames (not iframes) and I NEED the Lightbox 2 image to display over the entire browser window, not just the frame that the thumbnail is in.

    I’m not terribly skilled in this stuff – can anyone help me with this in plain English? :)

    Thanks a lot, Nancy

  904. Rohit Jul 30th, 2008

    Hello Lokesh ,

    I am very much thankful to you from making lightbox 2.0 module for drupal.

    I have once question I was making some HTML content in the LightBox and face one problem that I have content type “Sports” and when I access in the iframe of LightBox it is Showing good with the help of page-node-lightbox2.tpl.php but When I click on the node title it take me to the node content with closing the Lightbox mean it open the path in the Lightbox what I want is that when I click on the Title it will close the Lightbox Window and send me to the node content path. Is this possible in Lightbox if possible that how ?

  905. Trashin Aug 7th, 2008

    Hey!! thx! dude :) nice work :D i like this project :D

  906. Tania Apr 11th, 2009

    I’m having some problems getting the lightbox overlay to stretch horizontally across the screen in IE7 (Firefox is fine). Right now the overlay will cover about two thirds of the screen. Has anyone else had this problem?

    Any help would be fantastic. Thank you!

    Tania :)

  907. Sean Jun 4th, 2009

    For some reason I cannot get it to work? can somebody please help me! when i click the image instead of activating lightbox it opens a new page with the image? any ideas? HELP!!!

  908. Anonymous Jun 10th, 2009

    Hi! I really like your script. It is very useful. A couple questions.

    1. Is there any way to have the caption be on the right of the photo instead of below? If you have a long caption/description it makes it stretch way below the scroll line.

    2. How would one be able to link to like a pdf within the caption? Like if someone wanted to get more information about that image than was in the caption.

    Thanks for building a really great script.

  909. Anonymous Feb 6th, 2010

    Hi lokesh,

    I have three frame on my browser,
    in on of the 3 frames i m using your light box,
    but it is blocking only that frame in which i m using it. is it possible to block all frame when the light box opens.

  910. Will Mar 5th, 2010

    For those who wanted to constantly show the previous and next links, open up lightbox.css and go the line that says #PrevLink { and the line that says #NextLink {

    Add this to the instructions for each of those elements: url(../images/prevlabel.gif) left 15% no-repeat;

Leave a Reply