Results 1 to 5 of 5

Thread: Flashing Links script IE7 problem

  1. #1
    Join Date
    Mar 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Flashing Links script IE7 problem

    1) Script Title:
    Flashing Links script

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamicindex5/flashlink.htm
    3) Describe problem:

    After working for months. This script has suddenly started not working in IE7.

    Works fine in FF.

    IE gives the following error

    MS JScript runtime error: Object doesn't support this property or method.

    It's failing on this line in the script.

    var flashtype=document.getElementById? flashlinks[i].getAttribute("flashtype")*1 : flashlinks[i].flashtype*1

    Anyone got any ideas where to start. I suspect some MS update is the cause of the breakage.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Hmm... Weird. But this script would be really easy to make a much simpler version just with a settimeout. Ill let you know if I finish it.
    Jeremy | jfein.net

  3. The Following User Says Thank You to Nile For This Useful Post:

    crappiekiller (03-22-2008)

  4. #3
    Join Date
    Mar 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    That would be fantastic. One more odd clue the scripts page works on my home computer in IE7. I'll verify whether the scripts homepage works on my work computer and let you know. My home computer is XP Home if it matters and the work machines are XP Pro or W2k3 servers.

  5. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Here you are:
    Code:
    <html>
    <head>
    <title>Nile Good</title>
    <script type="text/javascript">
    var i=0;
    function flash(divid,background,color,speed)
    {
        div=document.getElementById(divid);
        bg="white"; //Here goes your background for your text when not blinking
        cr="black"; //Here does your color for your text when not blinking
    	if(i%2==0)
    	{
    		div.style.background=background;
    		div.style.color=color;
    	}else{
    		div.style.background=bg;
    		div.style.color=cr;
    	}
    	if(i>1)
    	{
    		i++;
    	}else{
    		i--;
    	}
    	setTimeout("flash('"+divid+"','"+background+"','"+color+"')",speed);
    }
    </script>
    </head>
    
    <body onload="flash('my','#F2F200','#5700EF','10');flash('new','#ef5678','#876789','500');flash('new2','#ED0000 ','#ffffff','1000');">
    
    <div id="my">This text should flash blue with a yellow background at the reate of 10 milliseconds</div>
    <div id="new">This text should flash black with a red background at the rate of 500 milliseconds.</div>
    <div id="new2">This text should flash white with a red background at the rate of 1000 milliseconds</div>
    </body>
    </html>
    Last edited by Nile; 03-23-2008 at 06:02 PM.
    Jeremy | jfein.net

  6. #5
    Join Date
    Mar 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    The only problem with the new script is that I'm building my page on the fly with data and I can't predict how many rows in my table will require the flashing link (which are all the same flash type). The other script worked really well until it broke in IE7.

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
  •