Results 1 to 3 of 3

Thread: Script no longer working after upgrade to IE 8

  1. #1
    Join Date
    Aug 2009
    Posts
    39
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Script no longer working after upgrade to IE 8

    Hi everyone,

    I could use some help from any of the real smart folks here (mainly because I'm a "dunce" where scripts are concerned ).

    I have this nice script that I found somewhere a long time ago...no idea where it actually came from. It's called
    "Apparition" and what it does is make a select image randomly appear and disappear on a webpage.
    Pretty much useless, UNLESS you are (like me) creating "decorative" websites, and your customers love their little
    added "special effects".

    Now, this script never did work in any browser other than Internet Explorer, BUT (unfortunately) it would seem that
    after IE 8 it doesn't work anymore at all.
    I can't attest to IE 9 or 10 since I went straight from IE 8 to IE 11 when I upgraded from Windows XP.

    So here is my question/request...could anyone maybe, just MAYBE find a way to PLEASE get this script working again in the newer
    versions of Internet Explorer?
    I have posted a page with the script at this link http://www.nightwingsgraphics.com/Ap...pparition.html
    and the script file can be viewed/downloaded here http://www.nightwingsgraphics.com/Apparition/layers.js

    The apparition sample page is just a plain page with black background, that has little golden paw-prints appearing and disappearing
    on it at random (at least if it's viewed with Internet Explorer 8 or earlier...Chrome, Firefox or other browsers won't show the effect).

    Any help I could get on this would be GREATLY appreciated.

    Thanks

  2. #2
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
      <title></title>
    <style type="text/css">
    /*<![CDATA[*/
    
    BODY {
      height:3000px;
    }
    
    /*]]>*/
    </style></head>
    
    <body>
    
    
    <script type="text/javascript">
    /*<![CDATA[*/
    
    function zxcRandomImage(o){
     var src=o.imageSRC,w=o.imageWidth,h=o.imageHeight,n=o.imageCount,mv=o.minInvisibleTime,ms=o.randomInterval
     var o=this,i=document.createElement('IMG'),m=document.createElement('DIV'),a,z0=0;
     o.ms=typeof(ms)=='number'&&ms>0?ms:2000;
     o.mv=typeof(mv)=='number'&&mv>0&&mv<o.ms?mv:o.ms/4;
     n=Math.max(typeof(n)=='number'&&n>0?n:1,1);
     h=typeof(h)=='number'&&h>0?h:null;
     w=typeof(w)=='number'&&w>0?w:null;
     m.style.position=i.style.position='fixed';
     m.style.right=m.style.bottom=m.style.width=m.style.height='0px';
     document.body.appendChild(m);
     i.style.zIndex='1001';
     i.style.left=i.style.top='-3000px';
     i.src=src;
     w&&h?i.width=w:null;
     w&&h?i.height=h:null;
     o.m=m;
     o.a=[];
     for (;z0<n;z0++){
      i=i.cloneNode(false);
      document.body.appendChild(i);
      a=[i];
      a[1]=setTimeout(function(){ o.show(a); },Math.floor(Math.random()*o.ms));
     }
    
    }
    
    zxcRandomImage.prototype={
    
     show:function(a){
      var o=this,ms=Math.floor(Math.random()*o.ms),mv=Math.floor(Math.random()*o.mv);
      clearTimeout(a[2]);
      a[0].style.left=Math.floor(Math.random()*(o.m.offsetLeft-a[0].width))+'px';
      a[0].style.top=Math.floor(Math.random()*(o.m.offsetTop-a[0].height))+'px';
      a[1]=setTimeout(function(){ o.show(a); },ms+mv);
      a[2]=setTimeout(function(){ a[0].style.top='-3000px'; },ms-mv);
    
     }
    }
    
    new zxcRandomImage({
    imageSRC:"http://www.vicsjavascripts.org/StdImages/1.gif",
    imageWidth:20,
    imageHeight:18,
    imageCount:5,
    minInvisibleTime:500,
    randomInterval:2000
    })
    /*]]>*/
    </script>
    </body>
    
    </html>
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. #3
    Join Date
    Aug 2009
    Posts
    39
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    AWESOME!!! And it even works in FF, Chrome and Opera where the other one didn't. Thank you soooo very much!

Similar Threads

  1. Javascript - No longer working
    By chriscc17 in forum JavaScript
    Replies: 10
    Last Post: 04-23-2013, 11:05 PM
  2. Resolved This script no longer works
    By ajfmrf in forum JavaScript
    Replies: 3
    Last Post: 01-20-2012, 05:11 AM
  3. Pop-It Menu Script.. not popping any longer
    By Branton in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 08-08-2009, 07:30 PM
  4. Pop-It Menu Script.. not popping any longer [pt 2]
    By Branton in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 08-08-2009, 07:29 PM
  5. Anylinks no longer working in IE6
    By kealaz in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 05-25-2008, 06:26 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •