Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts

    lightbox problem with internet explorer...

    Can anyone help with this...

    My website uses a few lightbox slideshows...

    http://www.macgregorandmacduff.co.uk/kings-club
    http://www.macgregorandmacduff.co.uk/kilts-social
    http://www.macgregorandmacduff.co.uk/kilt-hire

    they all work fine on firefox and chrome but on internet explorer it just takes you through to the image file.

    the f12 tools in IE give the following error report..

    object is NULL or undefined lightbox.js, line 226 symbol 20

    apparantly this is quite a common problem. I have looked around a few forums and been unable to find a fix. Can anyone help?

    Thanks

    Iain

  • #2
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    The on() method was introduced in jQuery 1.7 but you're using an earlier version of jQuery.

    Sensible would be to make sure you're using the most recent version of each library and plug-in, or at least to confirm that the various versions you use are compatible.

    However, you are also using jQuery, prototype, and scriptaculous frameworks on the same page. They are competing frameworks (jQuery <=> prototype) and they fight over the use of the dollar sign. jQuery.noConflict() doesn't resolve every issue and you need to use jQuery(..) rather than $(..) sometimes to keep them separate.

    Of course, the best long term solution would be to use one framework or the other..
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • Users who have thanked AndrewGSW for this post:

    iainmcewan21885 (07-18-2012)

  • #3
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks for replying!

    I have updated both the lightbox.js and prototype.js to the most recent versions.

    If I were to go through lightbox.js (or prototype.js) and replace the instances of $(etc...) with jQuery(etc...) would that solve the problem?

    sorry I am quite new at this.

    Thanks again

    Iain
    Last edited by iainmcewan21885; 07-18-2012 at 01:23 PM.

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,639
    Thanks
    6
    Thanked 1,004 Times in 977 Posts
    Quote Originally Posted by iainmcewan21885 View Post
    If I were to go through lightbox.js (or prototype.js) and replace the instances of $(etc...) with jQuery(etc...) would that solve the problem?
    They are two different JS frameworks that are incompatible. The noConflict function of jQuery is just fixing the symptoms and should only be used as very last resort if you have no influence on which libraries are there or might be added.

    The best solution would be to choose one framework only and stick with it. There is a plugin for nearly everything for both frameworks, I suppose, so no need to use a protoype plugin and a jQuery plugin on the same site. Plus, by adding both you are adding a lot of redundant overhead code to the site.

  • Users who have thanked VIPStephan for this post:

    iainmcewan21885 (07-18-2012)

  • #5
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks Andrew,

    so I have gotten rid of prototype.js

    Everything still works fine on firefox but IE is still just jumping to the image file as well as giving me this error now...

    SCRIPT5007: Object expected
    lightbox.js, line 345 character 3

    line 345 seems to contain...
    $(function() {

    Thanks for all the help

  • #6
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    Make sure that you have removed all references to prototype and uploaded/updated all the relevant files.

    Firefox might be displaying correctly, but does it have any error messages that might help? Press F12 to start FireBug (installed?) and refresh the page if necessary. The bottom-right corner, or the Console, will reveal any error messages.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • #7
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    I believe scriptaculous is dependant upon prototype(?) as well, so you should remove all references to this as well.

    Of course, this is all assuming that neither are needed or used anywhere in your code.

    But is your lightbox.js a jQuery or prototype plug-in?
    Last edited by AndrewGSW; 07-18-2012 at 06:22 PM.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS


  •  

    Tags for this Thread

    Posting Permissions

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