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?
WELL DONE!!!
Thanks! Gracias! Grazie! for the solution! you saved me!
thank u so much!!! great work!!!
T.H.A.N.K ::: Y.O.U
Saved my day! Thank you!
[...] [...]
I got it to work in firefox, a bit laggy though,,
But it doesnt work in safari, can anyone help with this?
Awesome…made the changes to line 216 & 222 and it worked perfectly. Thanks.
line #216 — if ((Element.readAttribute($(imageLink), “rel”) == ‘lightbox’)){
line #222 — $$(imageLink.tagName + ‘[href][rel="' + Element.readAttribute($(imageLink), "rel") + '"]‘).
This works perfect.
THANK YOU!
I am completely oblivious to web programming so I am trying to do this without understanding any of it. From reading this, Line 194 in the JS file needs:
target.rel=Element.readAttribute($(target), “rel”);
Which then makes line 216 (now 217) needing:
if ((Element.readAttribute($(imageLink), “rel”) == ‘lightbox’)){
and line 222 (now 223) needing:
$$(imageLink.tagName + ‘[href][rel="' + Element.readAttribute($(imageLink), "rel") + '"]‘).
After doing that, nothing works for me. So what does the addition to the area shape need to be? Right now if I try something like this:
Nothing works. What changes need to be made in the code for the body? Or am I doing something else wrong?
Awesome !! very good solution – a lifesaver indeed !!
Fantastic!
Working like a champ now.
How does the code look like if I want a Video LightBox to work with hotspot in dreamweaver?
Hi,
can’t figure out how to fix hotspot bug
This works :
However I need prev and next functionality and this doesn’t:
Please advise how I where I use Element.readAttribute($(imageLink), “rel”)
to fix this issue.
Many thanks !
Thanks alot. works perfectly!!!!!!!!!!!
[...] this one found via a forum redirecting to somebody’s blog: So just replace imageLink.rel with Element.readAttribute($(imageLink), “rel”) and [...]
Der Blog gefällt mir super. Vielen Dank für eure Arbeit. Weiter so!