Javascript errors with IE Javascript errors with IE
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Javascript errors with IE

Started by Alcor, April 11, 2009, 11:37:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Alcor

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.

phill104

It is a mistake to think you can solve any major problems just with potatoes.

Alcor

Sorry! This is the link.

All is ok with FF.

Fabricio Ferrero

I just confirmed. Try to fix it according to this suggestion.


[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]
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Alcor

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.

Quote from: Fabricio Ferrero on April 11, 2009, 04:51:11 PM
[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.

Alcor

Well, now there aren't errors in the suggestion, but the javascript error still remains.

Joachim Müller

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.

Alcor

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 ???

Joachim Müller

Then undo the mod by upgrading to cpg1.4.22

Alcor

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:

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.

Fabricio Ferrero

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.
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Alcor

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


Joe Carver