Slide show not working with Firefox

T

Thomas A. Rowe

The slideshow is only supported in IE browsers.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
T

Trevor L.

Funny you should say that, Mr/Ms Wind54Surfer.

I had a slideshow which worked perfectly in IE. Then following some chats
here, one of the experts said it doesn't work in Firefox (and a few others).
Sure enough he was correct.

I have now got it working, but the difficulty is remembering just which
change fixed it.

I know putting the if test in this code in Javascript certainly made a great
difference
if (!browser.ns4 && !browser.ns6)
{
document.images['SlideShow'].style.filter="blendTrans(duration=2)"
document.images['SlideShow'].style.filter="blendTrans(duration=crossFadeDuration)"
document.images['SlideShow'].filters.blendTrans.Apply()
document.images['SlideShow'].filters.blendTrans.Play()
}

function Browser()
{
this.dom = (document.getElementById) ? 1: 0;
this.ie4 = (document.all && !this.dom) ? 1: 0;
this.ns4 = (document.layers && !this.dom) ? 1: 0;
this.ns6 = (this.dom && !document.all) ? 1: 0;
this.ie5 = (this.dom && document.all) ? 1: 0;
this.ok = (this.dom||this.ie4||this.ns4);
this.platform = navigator.platform;
}
//------------------------------
var browser = new Browser();

It may well be that FP uses filter for its slideshow. If so getting rid of
code like this will help. All removing it does is disable a fading effect .

There may have been some other code I had to change

Anyway it works on my website if you want to check it out
--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
T

Theresa Bennett

Trevor,

I cannot view your slideshow in IE 6, although it seems to work perfectly in
Firefox. In IE, I get the following script errors and no pictures:

'preload images undefined' - on the main page
'class doesn't support automation' - on each of the slideshows I clicked on

HTH
--
Theresa Bennett
http://www.webworksite.com
Graphics/Flash/Templates/Galleries

===================================================
 
T

Trevor L.

Theresa,
Strange.

Someone else, I think Murray, said the same thing.
I opened the site in IE 6.0 SP2 just a few seconds ago and it worked great.
I have been reloading some of the site as I make changes, so something must
have got out of synch at some stage
--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
T

Trevor L.

Rob (Crash)

Thank you for checking.

I have this code.

In album.html (called by clicking on Picture Album):
-----------
<head>
....
<script type="text/javascript" src="slidelist.js">
</script>
....
</head>

<body class="thumbs" onload ="PreLoadThumbs()">
....
<table>
<tr>
<td>
<a href="#" onclick="openpopupSlide(1)">
<img id="Thumbs1" ><br>
<span id="Text1"></span></a>'
</td>
etc for images 2,3

(These <td> elements are actually generated by JS. openpopSlide() opens the
image in a larger window )

Javascript
----------
function PreLoadThumbs()
{
var SlidesImg = new Array()
var ThumbnailsImg = new Array()

for (i = 0 ; i < Pictures.length ; i++)
{ // Turns the string into an Image Object
// Uses arrays Slides and Thumbnails defined in slidelist.js
SlidesImg = new Image()
SlidesImg.src = Slides

ThumbnailsImg = new Image()
ThumbnailsImg.src = Thumbnails

// Places Image Object into Page
document.images["Thumbs" + (i + 1)].src = ThumbnailsImg.src
// Adds caption using array Captions defined in slidelist.js
document.getElementById('Text' + (i + 1)).innerHTML= (i + 1) + '. ' +
Captions
}
}

Do you think that removing
SlidesImg = new Image()
SlidesImg.src = Slides
from this code would speed up the loading?

Then, when each image is required it would be loaded and not before

I have not noticed the long load time, but I am on 256K broadband. I had
thought that at only 5 times dial-up I wasn't gaining much but clearly I am
:)

Thanks to you all and all who give advice here
--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
T

Trevor L.

Murray, I have to think about this

What I am trying to do is load the thumbnails in one go, then the larger
pictures would be loaded one at a time as they are needed. I have just
selected all the thumbnails in Windows Explorer (local disk) and clicked
Properties - it says 69KB (not 200)

Yes, I have had a look at Eleanor's sites. I will have another look and see
if I can glean more from there.

If the pages get too big, I will certainly split them into smaller pages
with each say 15-20 images. However, as I trying to load only one image at a
time, I can't see how it would make a lot of difference.
--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
M

Murray

it says 69KB (not 200)

My use of 200K was for illustrative purposes only.

Your method does NOT load the larger pictures on demand, however, as far as
I can tell. When you reference them in constructing the javascript array,
they are fetched from the server at that time.
 
T

Trevor L.

Thanks a lot,
Murray

I thought the 200KB may have been illustrative only, so I checked it see how
large the set of thumbnails were. If it had have been 200KB, then I would
have been concerned.

It is interesting to read that I am not loading the pictures on demand and
that "When you reference them in constructing the javascript array, they are
fetched from the server at that time."

I have altered my code to be similar to that used in your example, Murray,
of placing HTML in a layer, except that I place it in a <span> - it could
just as easily be a <div>.
It now reads:
<div><span id="Image">Image here</span></div>

Below this are buttons which call ChgImg() with a parameter ImgNum. The part
of the code in ChgImg() that overwrites "Image" is:
document.getElementById('Image').innerHTML = '<img src="' + Slides[ImgNum] +
'" alt="" name="SlideShow"><br>'

Would this only load one image at a time?

Otherwise, I would like to hear from you or anyone as to how to reference
them only as needed.

I thank all on the newsgroup who help me to further my knowledge of HTML/JS
--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
M

Murray

Would this only load one image at a time?

Yes, and in a very clever way, too, I must say. Good going.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top