192 users online (0 members and 192 guests)  


  Results 1 to 2 of 2

Related

  1. Replies: 1
  2. PHP and flash    Forum: PHP Forum
    Replies: 0
  3. Problem with background on a flash clock    Forum: Graphics Forum
    Replies: 2
  4. Problem with background on a flash clock    Forum: HTML Forum
    Replies: 1
  1. #1
    Brner's Avatar
    Disabled

    Status
    Offline
    Join Date
    Mar 2004
    Posts
    7

    Question Flash Problem!!!

    Hope this is in the right forum....Trying to change the color on this script dl'd from DynamicDrive site. I would like to leave the red but change the green to #99FF99 (a lighter brighter green)...

    <div align="center">
    <center>
    <table border="0" width="1016" id="wmflash1" style="border: 15px solid green" height="126">
    <tr>
    <td width="986" height="122">
    <p align="center"> <img border="0" src="images/phonemirror.gif" width="84" height="118">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp; <img border="0" src="images/headertan2.png" width="668" height="105">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp; <img border="0" src="images/Mobile_phone_sings.gif" width="84" height="118"><br></p>
    </td>
    </tr>
    </table>
    </center>
    </div>
    <script language="JavaScript1.2">
    <!--

    /*
    Flashing Table Border Script- 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 flashit(){
    var crosstable=document.getElementById? document.getElementById("wmflash1") : document.all? document.all.wmflash1 : ""
    if (crosstable){
    if (crosstable.style.borderColor.indexOf("green")!=-1)
    crosstable.style.borderColor="red"
    else
    crosstable.style.borderColor="green"
    }
    }
    setInterval("flashit()", speed)
    //-->
    </script>


    I've tried changing all instances of "green" to "#99FF99" with no luck. Am I trying to do something that this code can't handle?? As I am just learning this stuff, that's entirely possible and quite probable......

    Any help would be appreciated.....Thanks in advance....

    Don

  2. #2
    Brner's Avatar
    Disabled

    Status
    Offline
    Join Date
    Mar 2004
    Posts
    7

    Talking

    ....if (crosstable.style.borderColor.indexOf("green")!=-1)
    crosstable.style.borderColor="red"
    else
    crosstable.style.borderColor="green"
    }
    }
    setInterval("flashit()", speed)
    //-->
    </script>


    Found it.......the problem, that is....thanks to the knowledge of another coder.....the .indexOf started wrong. Should have been "red"...then the first crosstable color="green" and the last="red".....then all the "green's" can be changed to hex as I wanted and it works great....

    Don



Tags for this Thread