Dynamic cell border color change


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Dynamic cell border color change

Hybrid View

  1. #1
    Scott Guest

    Dynamic cell border color change


    I am attempting to set up an 'onmouseover' event which will change the color
    of a cell within a table, and another event to return the color to normal
    'onmouseout'. The basic premise is that I am attempting to design a table
    in which certain cells (the entire cell itself) is a hyperlink. The hyperlink
    part works, but there is no indication of a link other than on the status
    bar (even the cursor stays the same). By using the border color change,
    I hoped to indicate that something was 'clickable'. I am attempting to do
    this as an alternate method to creating an image map which I cannot use for
    this particular application.

    Any help is greatly welcomed.

  2. #2
    Dave Guest

    Re: Dynamic cell border color change


    Why not just set the cursor to a hand on the table cell to give the user the
    standard hyperlink feedback.
    <TD style="cursor:hand">

    Probably doesn't work in Netscape 4.x but works in IE and should work in
    NS6 and Opera.

    Thanks
    -Dave


    "Scott" <scott.stewart@ccra-adrc.gc.ca> wrote:
    >
    >I am attempting to set up an 'onmouseover' event which will change the color
    >of a cell within a table, and another event to return the color to normal
    >'onmouseout'. The basic premise is that I am attempting to design a table
    >in which certain cells (the entire cell itself) is a hyperlink. The hyperlink
    >part works, but there is no indication of a link other than on the status
    >bar (even the cursor stays the same). By using the border color change,
    >I hoped to indicate that something was 'clickable'. I am attempting to

    do
    >this as an alternate method to creating an image map which I cannot use

    for
    >this particular application.
    >
    >Any help is greatly welcomed.



  3. #3
    Dan Guest

    Re: Dynamic cell border color change

    To the best of my knowledge, there isn't such a thing as to make a whole
    cell a link, maybe to make a cell content just a link alone or links only,
    which should render the pointer cursor when the pointer is over the link, as
    to for for a flag on indicating is a clickable area/object, you can use the
    CSS cursor code with the onMouseOver and onMouseOut event handlers, among
    some you can use:
    This will do it with the cursor pointer ->
    <td onMouseOver="this.style.cursor='hand'"
    onMouseOut="this.style.cursor='default'"> <a href="SOMETHING"> BLAH </a>
    </td>

    This will do it using the background color of the cell ->
    <td onMouseOver="this.style.backgroundColor='#SOMECOLORCODE'"
    onMouseOut="this.style.backgroundColor='#SOMECOLORCODE'"> <a
    href="SOMETHING"> BLAH </a> </td>

    You could also use the Title attribute on the link itself, so the
    caption will indicate is a link or so ->
    <td > <a href="SOMETHING" title="CLICK ME DUDE!"> BLAH </a> </td>

    Among others, you can use an image to change indicating the link state
    or maybe a layer as well.

    Dan

    "Scott" <scott.stewart@ccra-adrc.gc.ca> wrote in message
    news:3c3362bd$1@147.208.176.211...
    >
    > I am attempting to set up an 'onmouseover' event which will change the

    color
    > of a cell within a table, and another event to return the color to normal
    > 'onmouseout'. The basic premise is that I am attempting to design a table
    > in which certain cells (the entire cell itself) is a hyperlink. The

    hyperlink
    > part works, but there is no indication of a link other than on the status
    > bar (even the cursor stays the same). By using the border color change,
    > I hoped to indicate that something was 'clickable'. I am attempting to do
    > this as an alternate method to creating an image map which I cannot use

    for
    > this particular application.
    >
    > Any help is greatly welcomed.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center