42 users online (0 members and 42 guests)  


  Results 1 to 2 of 2

Related

  1. Replies: 8
  2. Replies: 0
  3. Replies: 5
  4. SEARCH script not aligning in table correctly    Forum: Website Scripts Forum
    Replies: 4
  5. Custom Cursor Highlight    Forum: HTML Forum
    Replies: 3
  1. #1
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466

    highlight table script

    alright I'm pretty good with javascript but I'm not pro...I'm hopin u guys are proer(a word?) than me I got this script at Dynamic Drive:

    <script language="JavaScript1.2">

    /*
    Highlight Table Cells Script-
    Last updated: 99/01/21
    Dynamic Drive (www.dynamicdrive.com)
    For full source code, installation instructions,
    100's more DHTML scripts, and Terms Of
    Use, visit dynamicdrive.com
    */

    function changeto(highlightcolor){
    source=event.srcElement
    if (source.tagName=="TR"||source.tagName=="TABLE")
    return
    while(source.tagName!="TD")
    source=source.parentElement
    if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
    source.style.backgroundColor=highlightcolor
    }

    function changeback(originalcolor){
    if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
    return
    if (event.toElement!=source)
    source.style.backgroundColor=originalcolor
    }
    </script>

    Used to highlight the background of my tds on my menu. Anyways, there's two other things I want done to it:
    A border for the highlighted area.
    The td highlighted will function as a link.

    border: Have no clue

    link: I got it to link when the mouse hovered over the td...which is not what I wanted. But I can't get it to link by the click of the mouse.

    Any help would be appreciated thanks in advance.

  2. #2
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466
    second one was so obvious I missed it

    <td onclick="location.href="hello.php"'>

    But the border one is STILL open for DEBATE



Tags for this Thread