Hi folks,
This post is kept in English, because of some users in the Lighbox forum (Thread) having the same problem.
Bug description
Using Lightbox 2.04 with area tags an rel="lightbox" or rel="lightbox[Group]" in Firefox will result in a java-script error.
Reason for the Bug:
rel is not an attribute of area neither in HTML 4 (see http://www.w3.org/TR/html4/index/attributes.html) nor in XHTML 1.0 Strict/Transitional (see http://www.w3.org/TR/xhtml1/#defs and take a look at the DTS..).
Consequence: imageLink.rel doesn't work with Firefox.
Workaround:
But Prototype is still able to get the attribute ![]()
So just replace imageLink.rel with Element.readAttribute($(imageLink), "rel") and enjoy Lightbox!
You’re a lifesaver! Thank you very much.
Great solution, it does not only solve the problem with Firefox but also with Netscape navigator and Opera.
Vielen dank!
Hello,
Good solution. Thx
For avoiding risks of bugs, i placed it at line 194 :
event.stop();
if (!target.rel) target.rel=Element.readAttribute($(target), “rel”);
this.start(target);
there goes my hero !!!!
=D
Great fix! 2 replacements made in lines 216 and 212 and it works. Thank you
)
This is great, but it does not work for me if I make a set of images. Any solution? Please….
Thanks brother. You have saved my life with that fix!!!
McGinty
man u save me!
ty very much!!!!!
grazie mio salvatore… dopo 3 giorni a sbattere la testa contro un muro… mi hai salvato!!!!!!!
Perfect. Now it works great! Thank you!
life saving fix!
thank you
Cheers. Save me hours of work carving images into blocks !
Help! Can anyone tell me why this is not working?
http://pizzapartyonline.com/blog/2009/04/172/ (image link below video)
If I use a classic theme it works fine. It’s obviously something with the them, Any help?
Thanks,
Bear Silber
bearsilber@gmail.com
Hallo Bear,
I’m quite sure you simply forgot to initialize lightbox. (no javascript in HEAD)…
Please refer to: http://www.huddletogether.com/projects/lightbox2/#how
Regards
Alex
Hi, I tried it, and doesn’t work. IE does it but firefox just ront want to
the changes i made are
194row – if (!target.rel) target.rel=Element.readAttribute($(target), “rel”);
216row( with the change in 194 now 217) – if ((Element.readAttribute($(target), “rel”) == ‘lightbox’)){
222(now 223) – $$(imageLink.tagName + ‘[href][rel="' + Element.readAttribute($(target), "rel") + '"]‘).
I tried it all just changes in 216 and 222, just addin the 194row… nothing. i am sure that the problem is in me. So please help me. Thanks.
Muhaahahah i am sory for my second post… you all must just do the 194 insertion, and than put the fixed js in to the folder ( i forgot). Sory again. It works great.
Thank you very much, you just helped us a lot,
and thank you for writing it in english.
thank you so very much for this work around.
it has been immensely helpful.
KUDOS to you
GREAT!!!
I’m not getting it. Can someone draw me a picture?! I have the same issue where in Firefox the screen goes dim but the pic doesn’t come up in the light box. Works fine in I.E. I tried all kinds of code changes described above but all it did was make the pic show up in a new screen. I regressed.
Hallo Rachel,
you need to replace _all_ tags of imageLink.rel
Greetings Alex
Thanks so much…great workaround, saved me a lot of time today!
Thank you for posting this! It worked perfectly! As a heads up to anyone trying it out, I found two instance of imageLink.rel in lightbox.js that I replaced.
Thanks so much for this, its saved me alot of wasted hours.
It doesn’t work on Safari! Have you an idea?