tags:

views:

32

answers:

1

I have 3 column table, I will need one of the columns to give me color change notification or flashing, how to do this?

A: 

There's a (rather annoying) simple JavaScript code snippet here that does this:

http://www.javascriptbank.com/flashing-background-color.html

You can make it less annoying by reducing the number of colors and increasing the delays :)

Note that you'll have to modify it from using the entire document to using just the element(s) that you want to change. I'm guessing a bunch of td elements?

David
this is full background and it has many colors i need only flashing with one color and in one columns in the table
alkitbi
You can reduce the number of colors by just removing those lines in the code. As for just the column, unless there's a way to reference a column in HTML with which I am unfamiliar (entirely possible) I imagine you could just set those td elements to all share a class descriptor and select elements based on that.
David
can you give me example for any one td ?
alkitbi
document.getElementsByClassName('test'); should get any elements that have a class "test" on them. Put that class on the td elements in question and it'll find them. You can also use jQuery selectors to put a little more logic into it. Or you could select all the tr elements and loop through them selecting the nth td element in each one, etc.
David