Results 1 to 5 of 5

Thread: Does anyone know how I can change this code to .....

  1. #1
    Join Date
    Jan 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Does anyone know how I can change this code to .....

    Does anyone know how I can change this code to make text do this? It is a flashing table by the way. It flashes from color to another. You can see what I'm talking about in the thread below.



    <table border="0" width="280" id="myexample" style="border:5px solid green">
    <tr>
    <td>Insert anything you want into this table.<br>Insert anything you want into this table.<br>Insert anything you want into this table.<br></td>
    </tr>
    </table>
    <script language="JavaScript1.2">
    <!--

    /*
    Flashing Table Border Script- &#169; Dynamic Drive (www.dynamicdrive.com)
    Visit http://www.dynamicdrive.com for this script
    Credit must stay intact for use
    */

    //configure interval btw flash (1000=1 second)
    var speed=500

    function fla****(){
    var crosstable=document.getElementById? document.getElementById("myexample") : document.all? document.all.myexample : ""
    if (crosstable){
    if (crosstable.style.borderColor.indexOf("green")!=-1)
    crosstable.style.borderColor="red"
    else
    crosstable.style.borderColor="green"
    }
    }
    setInterval("fla****()", speed)
    //-->
    </script>

  2. #2
    Join Date
    Jan 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    HTML Code:
    <a href="http://www.dynamicdrive.com/dynamicindex11/other2.htm">

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>Flash Table Border and/or Text Color</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    </head>
    <body>
    <table border="0" width="280" id="myexample" style="border:5px solid green">
    <tr>
    <td>Insert anything you want into this table.<br>Insert anything you want into this table.<br>Insert anything you want into this table.<br></td>
    </tr>
    </table>
    <script type="text/javascript">
    
    /*
    Flashing Table Border &/or Text Script- © Dynamic Drive (www.dynamicdrive.com)
    Visit http://www.dynamicdrive.com for this script
    Credit must stay intact for use
    Modified in DD Forums by jscheuer1
    http://www.dynamicdrive.com/forums
    */
    
    //configure interval btw flash (1000=1 second)
    var speed=500
    var startColor='green'
    var changeColor='red'
    rotate=2  //Set to 1 (border only), 2 (text only), or 3 (border & text).
    
    //////////////////Stop Editing///////////////////
    
    var baseColor=startColor
    
    function flashit(){
    var crosstable=document.getElementById? document.getElementById("myexample") : document.all? document.all.myexample : ""
    if (crosstable){
    if (startColor==baseColor){
    if (rotate==1||rotate==3)
    crosstable.style.borderColor=changeColor
    if (rotate==2||rotate==3)
    crosstable.style.color=changeColor
    startColor=''
    }
    else{
    if (rotate==1||rotate==3)
    crosstable.style.borderColor=baseColor
    if (rotate==2||rotate==3)
    crosstable.style.color=baseColor
    startColor='green'
    }
    }
    }
    setInterval("flashit()", speed)
    
    </script>
    </body>
    </html>
    Last edited by jscheuer1; 01-17-2006 at 05:27 AM. Reason: Get over on the forum's overzealous censoring
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    And watch the epileptics drop.
    Seriously, this is a very bad idea; even those people who don't have epilepsy will find the effect irritating and possibly headache-inducing.

    I love the way the forum censored flash it() (minus the space). Remember to correct that if you copy/paste.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey
    And watch the epileptics drop.
    Seriously, this is a very bad idea; even those people who don't have epilepsy will find the effect irritating and possibly headache-inducing.
    I agree 200%

    Quote Originally Posted by Twey
    I love the way the forum censored flash it() (minus the space). Remember to correct that if you copy/paste.
    Solved! Don't try this at home kids.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •