Lightbox 2 in IE javascript error

otinanism - May 26, 2009 - 11:25
Project:Lightbox2
Version:6.x-1.x-dev
Component:Javascript
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I get an invalid argument error in line 347 apparently, which is:

if (anchor.href && typeof(anchor.href) == "string" && $(anchor).attr('rel')) {

The weird thing is that I get this only in IE and only when using theme wabi!

Any help will be appreciated.

Thank you.

#1

stella - May 26, 2009 - 11:39

Can you check that your links are all valid? I've seen that error before with a link like http://example:com, it was just a simple typo in the url causing the problem. Also are you using the latest dev version of the module?

#2

otinanism - May 27, 2009 - 17:15

i am not sure how could the url's be invalid and work in firefox and not in IE...
what i noticed wat that if i remove from the line

if (anchor.href && typeof(anchor.href) == "string" && $(anchor).attr('rel')) {

the first condition

anchor.href &&

lightbox works both in IE and firefox!

i am using the latest dev release

#3

tassoman - June 6, 2009 - 10:53

I have the same problem. It's breaking also other js loading such as wysiwyg fckeditor. More, clicking an emfield set as "Lightbox/thickbox > full video", it's opening the tickbox flavour.

emvideo/thickbox/31/425/350/field_promo_vimeo/vimeo/1841362

Switching to lite version works flawless. My IE is 7th, lightbox version is DEV.

#4

mclinn - October 26, 2009 - 21:00

I'm using Drupal 5.15, Lightbox v 5.x-2.9. JSquery 1.2.6. IE7 and IE8 were giving me several javascript errors, slowing down page loads considerably (even after turning off "debug javascript" and "report errors" in IE, this had no effect.)

One of them pointed to "char 1, line 1114" in lightbox.js.

Turns out I had 1113 lines in the file -- and an extra carriage return, which created an empty line 1114.

I removed the extra line and saved the file -- my js errors in IE have not returned.

I haven't tested extensively so can't say for certain that all is well but it looks much better so far.

I hope this helps someone. I have learned so much from these postings that I have to give something back or be consumed with guilt ... and I hate guilt.

 
 

Drupal is a registered trademark of Dries Buytaert.