Page 2 of 3

Re: Internet Explorer cannot open the Internet site - Operation

Posted: 18 Feb 2009, 21:04
by ingo
Hy,

I solved the problem. The proposed fix listed in the FAQ didn't help. The problem was, as stated before by someone else, that the script tries to write something while the page has not finsihed loading. I changed the following:

phocagalleryslideshow.php:

Instead of:

Code: Select all

$script .= 'new fadeshow(fadeimages'.$c.', '.$width.', '.$height.', 0, '.$delay.', 1, \'R\')' . "\n";*/
new:

Code: Select all

$script .= "function fadeshowladen() {\n";
$script .= 'new fadeshow(fadeimages'.$c.', '.$width.', '.$height.', 0, '.$delay.', 1, \'R\');' . "\n";
$script .= "}\n";
$script .= "if(window.onload) {\n";
$script .= "var temp = window.onload;\n";
$script .= "window.onload=function(e) {\n";
$script .= "temp(e);\n";
$script .= "fadeshowladen();\n";
$script .= "};\n}\n else{\n window.onload=function(e) {\n";
$script .= "fadeshowladen();\n";
$script .= "};\n}";
I changed as well in the phocagalleryslideshow.js the document.write method to something else - but I think that has had no effect. The more important change was the one above. Now it works fine on IE6, IE7, FF, Opera, Safari...

Of course I am not sure if it works on all cicrumstances - I only can say that it works in my environment.

Perhaps you want to use the solution for your next update...? Surely it still can be code-optimized, it was quick and dirty...

With best regards
Ingo Dreyer

Re: Internet Explorer cannot open the Internet site - Operation

Posted: 19 Feb 2009, 20:41
by Jan
Hi Ingo, will be great to implement it, but I get :

picobj is null error in javascript and the site goes blank... maybe something what you have changed is missed in the topic. Please can you let us know the changes in phocagalleryslideshow.js...

Thank you, Jan

Re: Internet Explorer cannot open the Internet site - Operation

Posted: 20 Feb 2009, 20:28
by ingo
Hy Jan,

maybe you are right. I changed as well the document.write to another method, but I thought, this was without effect.

If you give me your mail-address I will mail you the complete files.

Here are my complete changes:

phocagalleryslideshow.php (beginning at line 101)

Code: Select all

                       $script .= "function fadeshowladen() {\n";
                        $script .= 'new fadeshow(fadeimages'.$c.', '.$width.', '.$height.', 0, '.$delay.', 1, \'R\');' . "\n";
                        $script .= "}\n";

                        $script .= "if(window.onload) {\n";
                        $script .= "var temp = window.onload;\n";
                        $script .= "window.onload=function(e) {\n";
                        $script .= "temp(e);\n";
                        $script .= "fadeshowladen();\n";
                        $script .= "};\n}\n else{\n window.onload=function(e) {\n";
                        $script .= "fadeshowladen();\n";
                        $script .= "};\n}";

/*				$script .= 'new fadeshow(fadeimages'.$c.', '.$width.', '.$height.', 0, '.$delay.', 1, \'R\')' . "\n";*/
				$script .= '</script>'. "\n";
				$c++;
			
				$output	 = '';
				$output .= '<div class="phocagalleryslideshow" style="text-align:center;"><div id="phocagallerycontent"></div>' . "\n";
				$output .= $script;
				$output .='</div>';
phocagalleryslideshow.js (beginning at line)

Code: Select all

var contentdiv=document.getElementById("phocagallerycontent");
 
if (contentdiv)
{
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
contentdiv.innerHTML='<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>';
else
contentdiv.innerHTML='<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>';
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}
}
As far as I remember that was all. You can see a live result at
http://neu.rfv-effringen.de/joomla/inde ... &Itemid=54

With best regards
Ingo

Re: Internet Explorer cannot open the Internet site - Operation

Posted: 24 Feb 2009, 19:54
by Jan
Hi Ingo, I have implemented it and released new version. For me it works so I hope it will work for other users too...

Thank you, Jan

Re: Internet Explorer cannot open the Internet site - Operation

Posted: 04 Mar 2009, 06:05
by chop
Jan,

I'm receiving this error on my frontpage. The only module I'm using on that page is the random image module. Is the same issue present there? I noticed there hasn't been a new release of that in a while.

Thanks!
Chop

Re: Internet Explorer cannot open the Internet site - Operation

Posted: 04 Mar 2009, 10:28
by caro84g
Hi,

have you tried the original solution, presented in the FAQ?

Regards, Carolien

Re: Internet Explorer cannot open the Internet site - Operation

Posted: 07 Mar 2009, 05:07
by chop
I have tried the change posted in the FAQ with no luck. Any ideas?

Re: Internet Explorer cannot open the Internet site - Operation

Posted: 08 Mar 2009, 11:51
by Jan
then try to add to your javascripts which are created in the site the attribute: defer="defer" this means that the javascript will be run after page is loaded... If IE cannot open site bug is displayed, it is most about two javascripts which are run in script...

Jan

Re: Internet Explorer cannot open the Internet site - Operation

Posted: 11 Mar 2009, 10:15
by timsimon
Hi Jan
Above you say

"add to javascripts codes on your site the defer="defer" attribute:

from:
<script src="script.js" type="text/javascript" ></script>

to:
<script src="script.js" type="text/javascript" defer="defer"></script>

Could you please be specific as to where this change is applied. :?
Regards Tim

Re: Internet Explorer cannot open the Internet site - Operation

Posted: 14 Mar 2009, 20:16
by Jan
Hi, I cannot be specific :( , I have added this code into Phoca Extensions like into Phoca Gallery Menu Module but I don't know which extensions and which javascript you have on your site, so I cannot say which javascripts can do the problems on your site :-(