Jump to content

Slideshow works in IE not FF or Opera


SmokingMan

Recommended Posts

I use the window.open() method to launch a new window sized to fit a slideshow. It works fine in IE. In FF the new window will open as it should, but when you click on the forward button to get to the next image, you get an error message. In Opera, the window opens correctly, but the slideshow doesn't work at all.It all seemed to be okay until I used the onclick to call the window.open() to open the slideshow window. Here's the code for the .open() method:

function	openShow(url)	{window.open(url,"","location=0,height=425,width=500,left=200,top=50,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");}

This is the button code to go forward in the show:

    <td><a href="#" onClick="javascript:control('F');">    <img class="noborder" id="next" src="../../images/next-ssbutton1.gif" alt="Next Image" title="Next Image" width="100" height="17"    onmouseover="imageOn('next'); return statusMsg('Next Image')";    onmouseout="imageOff('next'); return statusMsg('')"></a></td>

And here's the code for the slideshow:

// Set the slideshow speed (in milliseconds)var SlideShowSpeed = 3000;// Set the duration of crossfade (in seconds)var CrossFadeDuration = 4;var Picture = new Array(); var showHot = false;    // Specify the image files...Picture[1] = 'mmMissy062798(1).JPG';Picture[2] = 'mmMissy062798(2).JPG';Picture[3] = 'mmMissy062798(3).JPG';Picture[4] = 'mmMissy062798(4).JPG';Picture[5] = 'mmMissy071303(1).JPG';Picture[6] = 'mmMissy071303(2).JPG';Picture[7] = 'mmMissy071303(3).JPG';Picture[8] = 'mmMissy071303(4).JPG';Picture[9] = 'mmMissy071303(5).JPG';Picture[10] = 'mmMissy071303(6).JPG';Picture[11] = 'mmMissy080302.JPG';Picture[12] = 'mmMissy110403(1).jpg';Picture[13] = 'mmMissy110403(2).jpg';Picture[14] = 'mmMissy110403(3).jpg';Picture[15] = 'mmMissy110403(4).JPG';Picture[16] = 'mmMissy110403(5).JPG';Picture[17] = 'mmMissy110403(6).JPG';Picture[18] = 'mmMissyWaiting.jpg';Picture[19] = 'mmPrettyGirl.jpg';var tss;var iss;var jss = 0;var pss = Picture.length-1;var preLoad = new Array();for (iss = 1; iss < pss+1; iss++){preLoad[iss] = new Image();preLoad[iss].src = Picture[iss];}function control(how){	if (showHot){  if (how=="H") jss = 1;  if (how=="F") jss = jss + 1;  if (how=="B") jss = jss - 1;  if (jss > (pss)) jss=1;  if (jss < 1) jss = pss; 	 if (document.all){ 	 document.images.PictureBox.style.filter="blendTrans(duration=2)"; 	 document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)"; 	 document.images.PictureBox.filters.blendTrans.Apply();}  document.images.PictureBox.src = preLoad[jss].src;  if (document.all) document.images.PictureBox.filters.blendTrans.Play();  }}

I want to be able to open a smaller window for the slideshow, but I can't seem to figure out why this only works in IE.

Link to comment
Share on other sites

In FF I get this error message after clicking the forward button:

Not FoundThe requested URL /albums/missy/F was not found on this server.Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

In Opera it doesn't work at all.

Link to comment
Share on other sites

It works well in both IE and FF for me :) It didn't work in Opera though, when you first aquired this script, did it work in Opera then?

Link to comment
Share on other sites

I think it did, maybe I didn't test it in Opera, I honestly don't remember now :) But in FF when I click for the next image, it displays for an instant, then I get the error message. I've tried clearing my cache, but to no avail. I'm stumped.------------------------------------------------------------------------------------Okay I'm really stumped now. I accessed it with FF from another page in the site and now it works! Then I linked back to the main page and it's working now. I wasn't imagining this...REALLY!!!! The menu is exactly the same on every page, go figure.Homey needs a drink :) Of course it still doesn't work in Opera.

Link to comment
Share on other sites

Glad you got it working or should i say notice it works :) My guess is that it probably never did work in opera, sometimes it's best when you pick up a script to try it and make sure it works on IE, FF and Opera before implementing it. I have been stung in the past when using a pre-built script and testing it in the main 3 when finished and noticing that it didn't work right, only to go back to the original script to see that it never did :) So from now on i check before i use :)

Link to comment
Share on other sites

Well I ran the Javascript console on Opera and got the error message, but I don't understand it. I tried to walk through their debugging tutorial, but it's beyond me. Maybe someone else can walk me though this. Here's the script on the page:

var tss;var iss;var jss = 0;var pss = Picture.length-1;var preLoad = new Array();for (iss = 1; iss < pss+1; iss++){preLoad[iss] = new Image();preLoad[iss].src = Picture[iss];}function control(how){	if (showHot){		if (how=="H") jss = 1;		if (how=="F") jss = jss + 1;		if (how=="B") jss = jss - 1;		if (jss > (pss)) jss=1;		if (jss < 1) jss = pss;			if (document.all){			document.images.PictureBox.style.filter="blendTrans(duration=2)";			document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";			document.images.PictureBox.filters.blendTrans.Apply();}		document.images.PictureBox.src = preLoad[jss].src;		if (document.all) document.images.PictureBox.filters.blendTrans.Play();		}}

This is the onClick event line:

<td><a href="#" onClick="java script:control('F');"><img class="noborder" id="next" src="../../images/next-ssbutton1.gif" alt="Next Image" title="Next Image" width="100" height="18"	onmouseover="imageOn('next'); return statusMsg('Next Image')";	onmouseout="imageOff('next'); return statusMsg('')"></a></td>

And here's the console error message:Missy's Photo Slideshowhttp://testdomain.ftwin.com/albums/missy/missy-slideshow.htmlEvent thread: clickError:name: TypeErrormessage: Statement on line 55: Could not convert undefined or null to objectBacktrace: Line 55 of inline#1 script in http://testdomain.ftwin.com/albums/missy/missy-slideshow.html document.images.PictureBox.filters.blendTrans.Apply(); Line 1 of script control("F"); At unknown location [statement source code not available]Can someone walk me through this so I can understand?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...