Re: Slideshow and Opera

From: Jon Spivey (jons_at_mvps.org)
Date: 08/09/04


Date: Mon, 9 Aug 2004 14:27:55 +0100

It looks like Opera is passing if(document.all) so I'd change this line
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
to
if (document.all && !window.opera) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
and then
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
to
if (document.all && !window.opera) {
document.images.SlideShow.filters.blendTrans.Play();
}

This should stop Opera trying to run the filters, then the slideshow should
work as it does in Netscape.

--
Cheers,
Jon
Microsoft MVP
"Stefan B Rusynko" <sbr_enjoy@hotmail.com> wrote in message
news:OQ5M5xgfEHA.3520@TK2MSFTNGP10.phx.gbl...
> That's because the filters/transitions you are trying to use are supported
by IE only
>
> --
>
> _____________________________________________
> SBR @ ENJOY (-:              [ Microsoft MVP - FrontPage ]
> "Warning - Using the F1 Key will not break anything!"  (-;
> To find the best Newsgroup for FrontPage support see:
>   http://www.net-sites.com/sitebuilder/newsgroups.asp
> _____________________________________________
>
>
> "jack" <jack@2wire.ch> wrote in message
news:41175425$0$326$4d4ef98e@read.news.ch.uu.net...
> | I am using a script to run a small slideshow on my site.  The script
works
> | perfectly in Explorer....ok in Netscape (the transition does not
function,
> | although the pictures do swap), and not at all in Opera...The error
message
> | for Opera states in the backtrace:
> |
> |     Line 39 of inline33 script in
> | http://www.laughinglemon.ch/instruction.htm
> | document.images.SlideShow.filters.blendTrans.Apply();
> |     In unknown script
> |         runSlideShow();
> |     At unknown location
> |         {event handler trampoline}
> |
> | The script I am using:
> |
> | <SCRIPT LANGUAGE="JavaScript">
> | <!-- Original: CodeLifter.com (support@codelifter.com) -->
> | <!-- Web Site: http://www.codelifter.com -->
> | <!-- Begin
> | // Set slideShowSpeed (milliseconds)
> | var slideShowSpeed = 5000;
> |  // Duration of crossfade (seconds)
> | var crossFadeDuration = 100;
> | // Specify the image files
> | var Pic = new Array();
> | // to add more images, just continue
> | // the pattern, adding to the array below
> |
> | Pic[0] = 'images/slideshow/instruction01.jpg'
> | Pic[1] = 'images/slideshow/instruction02.jpg'
> | Pic[2] = 'images/slideshow/instruction03.jpg'
> | Pic[3] = 'images/slideshow/instruction04.jpg'
> | Pic[4] = 'images/slideshow/instruction05.jpg'
> | Pic[5] = 'images/slideshow/instruction06.jpg'
> | Pic[6] = 'images/slideshow/instruction07.jpg'
> | Pic[7] = 'images/slideshow/instruction08.jpg'
> | Pic[8] = 'images/slideshow/instruction09.jpg'
> | Pic[9] = 'images/slideshow/instruction10.jpg'
> |
> | // do not edit anything below this line
> | var t;
> | var j = 0;
> | var p = Pic.length;
> | var preLoad = new Array();
> | for (i = 0; i < p; i++) {
> | preLoad[i] = new Image();
> | preLoad[i].src = Pic[i];
> | }
> | function runSlideShow() {
> | if (document.all) {
> | document.images.SlideShow.style.filter="blendTrans(duration=2)";
> |
> |
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuratio
> | n)";
> | document.images.SlideShow.filters.blendTrans.Apply();
> | }
> | document.images.SlideShow.src = preLoad[j].src;
> | if (document.all) {
> | document.images.SlideShow.filters.blendTrans.Play();
> | }
> | j = j + 1;
> | if (j > (p - 1)) j = 0;
> | t = setTimeout('runSlideShow()', slideShowSpeed);
> | }
> | // End -->
> | </script>
> |
> | <BODY  onLoad="runSlideShow()">
> | <table border="0" cellpadding="0" cellspacing="0" width="200"
height="202">
> | <tr>
> | <td id="VU" height=200 width=200 bgcolor="#666666"
> | style="border: 1px solid #808080">
> | <img src="images/slideshow/instruction01.jpg" name='SlideShow' width=200
> | height=200></td>
> | </tr></table></center>
> |
> | </body>
> |
> | Any ideas/suggestions to this newbie would be appreciated!
> |
> | Jack
> |
> |
>
>


Relevant Pages

  • Re: Change IP related values due to WAN design change
    ... Unknown network, ... For the cost of testing a dangerous script in a big ... > recurse your text file into an array. ... > var newSettings = new NetworkSettings; ...
    (microsoft.public.windows.server.scripting)
  • Re: addEvent - The late entry :)
    ... approach used in converting an - arguments - object into an array can be chosen at the point of needing to do it. ... I did include a dedicated function in my tests (one that did little more than create a new array and loop over the 'array index' properties of its argument object copying values to corresponding properties of the new array). ... the number of iterations should be the most that any particular system will allow without putting up the 'A script on this page ... ... var argsIndex = 0; ...
    (comp.lang.javascript)
  • Re: Calling JavaScript
    ... To get the script to do what you want as it is written, place it in a single cell table, or a cell ... var months = new Array( ...
    (microsoft.public.frontpage.client)
  • Re: Picture Fade
    ... Sorry for the copy and paste of this script but I believe this is what you want. ... var slideShowSpeed = 5000; ... adding to the array below ... > Microsoft FrontPage MVP ...
    (microsoft.public.frontpage.client)
  • Re: Building a WMI Moniker - Problem
    ... This is not a "script" as such, ... Get the computer names from that file and stuff them into an Array() ... var strScriptPath = WScript.ScriptFullName; ... The processComputer() function would be defined elsewhere and would ...
    (microsoft.public.win32.programmer.wmi)