forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Alcor on April 11, 2009, 11:37:28 am

Title: Javascript errors with IE
Post by: Alcor on April 11, 2009, 11:37:28 am
Hello!

I don't know if it's the right forum for this topic, if not, please move it, sorry.

I'm having some problems with CPG and the IE browser. When an image displays, if I click the show/hide file information button or the slideshow one, IE returns me a javascript error and does not execute the requested action. I upgraded to the latest version of CPG thinking that would solve the issue, but not.

The mods installed:
-Slider
-Imageflow
-EnlargeIt

Thanks.
Title: Re: Javascript errors with IE
Post by: phill104 on April 11, 2009, 11:43:01 am
A link to your site might help ;)
Title: Re: Javascript errors with IE
Post by: Alcor on April 11, 2009, 12:00:26 pm
Sorry! This is the link (http://www.cosasagapornis.com/cpg/).

All is ok with FF.
Title: Re: Javascript errors with IE
Post by: Fabricio Ferrero on April 11, 2009, 04:51:11 pm
I just confirmed. Try to fix it according to this suggestion (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.cosasagapornis.com%2Fcpg%2Fdisplayimage.php%3Fpos%3D-3907&charset=%28detect+automatically%29&doctype=Inline&group=0).


[off topic] I really like your gallery! Just a question, why did you place the "grad1.png" behind your main menu, if you just delete that image your cloud image woul'd not be cutted. (See attach) [/off topic]
Title: Re: Javascript errors with IE
Post by: Alcor on April 11, 2009, 07:17:38 pm
Thanks Fabricio. I'll try to fix it. The body id is empty because it changes by time of day, giving the theme appearance night or day.

[off topic] I really like your gallery! Just a question, why did you place the "grad1.png" behind your main menu, if you just delete that image your cloud image woul'd not be cutted. (See attach) [/off topic]

I don't know, I liked more this way, and the main menu didn't appear to be in the air.
Title: Re: Javascript errors with IE
Post by: Alcor on April 11, 2009, 07:37:07 pm
Well, now there aren't errors in the suggestion, but the javascript error still remains.
Title: Re: Javascript errors with IE
Post by: Joachim Müller on April 11, 2009, 08:54:40 pm
Probably related to slider/enlargeIt. Those plugins make extreme use of JavaScript. Try to track down which one is the culprit by temporarily disabling one of them, then force-reload the browser and see if the error goes away. Can't tell you more, as I don't have IE.
Title: Re: Javascript errors with IE
Post by: Alcor on April 30, 2009, 11:33:19 am
Hello.

Thanks for your answers. Good, I uninstalled all the plugins but the results were negative, the javascript error continues. I didn't remember that I had installed the greybox long ago, but this "plugin" cannot be uninstall through the plugin manager. I think this mod is causing javascript errors ???
Title: Re: Javascript errors with IE
Post by: Joachim Müller on May 01, 2009, 11:58:03 pm
Then undo the mod by upgrading to cpg1.4.22
Title: Re: Javascript errors with IE
Post by: Alcor on July 21, 2009, 09:14:37 am
I get back with this thread, sorry not to answer before.

I uninstalled all the plugins and the javascript error continued there. Finally I upgraded to cpg 1.4.25 thinking that the error would disappear, but not.

Opening the IE javascript error window, I checked that the problem is in scripts.js, line 57 character 17, specifically the ffunction:

Code: [Select]
function blocking(nr, cookie, vis_state)
{
        if (document.layers)
        {
                current = (document.layers[nr].display == 'none') ? vis_state : 'none';
                if (cookie != '')
                        writeCookie(nr, current);
                document.layers[nr].display = acurrent;
        }
        else if (document.all)
        {
                current = (document.all[nr].style.display == 'none') ? vis_state : 'none';
                if (cookie != '')
                        writeCookie(nr, current);
                document.all[nr].style.display = current;
        }
        else if (document.getElementById)
        {
                display = (document.getElementById(nr).style.display == 'none') ? vis_state : 'none';
                if (cookie != '')
                        writeCookie(nr, display);
                document.getElementById(nr).style.display = display;
        }
}

Well, if I change the name of the variable "current", IE doesn't give me the javascript error.
Title: Re: Javascript errors with IE
Post by: Fabricio Ferrero on July 21, 2009, 09:30:05 am
I have just tested your site, the script you're using to give the apparence of night or day is causing the issue. The line 22 is the conflicting one.

Please, put that piece of code out, clean your cache, and reload the page.
Title: Re: Javascript errors with IE
Post by: Alcor on July 21, 2009, 12:20:05 pm
This script uses the prototype library and it wasn't load, so the lightbox plugin let to work and I don't know why.

Lightbox shows me another javascript error:

Mensaje: 'document.getElementById(...)' es nulo o no es un objeto
Línea: 182
Carácter: 7
Código: 0
URI: http://www.domain.com/cpg/plugins/light_box/slideshow/js/lightbox_s.js

Title: Re: Javascript errors with IE
Post by: Joe Carver on July 21, 2009, 01:07:43 pm
LightBox Slideshow plugin has an error related to the counter.

See: http://forum.coppermine-gallery.net/index.php/topic,59013.msg291079.html#msg291079