Internet Explorer cannot open the Internet site - Operation

Phoca Gallery - image gallery extension
ingo
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 16 Feb 2009, 22:07

Re: Internet Explorer cannot open the Internet site - Operation

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Internet Explorer cannot open the Internet site - Operation

Post 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
If you find Phoca extensions useful, please support the project
ingo
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 16 Feb 2009, 22:07

Re: Internet Explorer cannot open the Internet site - Operation

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Internet Explorer cannot open the Internet site - Operation

Post 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
If you find Phoca extensions useful, please support the project
chop
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 04 Mar 2009, 06:00

Re: Internet Explorer cannot open the Internet site - Operation

Post 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
User avatar
caro84g
Phoca Hero
Phoca Hero
Posts: 1369
Joined: 11 Feb 2008, 17:52
Location: Holland
Contact:

Re: Internet Explorer cannot open the Internet site - Operation

Post by caro84g »

Hi,

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

Regards, Carolien
Please ask your support questions in the forums and not via PM - I delete those PM's
Backup before you do any major change to your website (and test first)
chop
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 04 Mar 2009, 06:00

Re: Internet Explorer cannot open the Internet site - Operation

Post by chop »

I have tried the change posted in the FAQ with no luck. Any ideas?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Internet Explorer cannot open the Internet site - Operation

Post 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
If you find Phoca extensions useful, please support the project
timsimon
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 11 Mar 2009, 10:09

Re: Internet Explorer cannot open the Internet site - Operation

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Internet Explorer cannot open the Internet site - Operation

Post 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 :-(
If you find Phoca extensions useful, please support the project
Post Reply