By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,939 Members | 1,684 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,939 IT Pros & Developers. It's quick & easy.

mouseover, mouseout and onclick in a <TD>

P: n/a
Hi everyone -

I am trying to accomplish a task that i thought would be easy -
and at this point - i'm starting to wonder...

I have a table setup, one column, ten rows

All the cells start off with a white background,
as the mouse passes over the cell, the background color
changes to a nice light blue. I have that working ok -

but the trick comes in as - when a user clicks in the
cell - i would like to change the background color to silver,
and when the user moves the mouse off of the cell - the background
will stay silver, until the user clicks another of the cells,
then that cell switches to silver, and the rest of the cells turn
to white...


does anyone have code to complete this task??

thanks
tony
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 26 Feb 2004 13:10:15 -0800, Tony Farrell <pi********@hotmail.com> wrote:
I am trying to accomplish a task that i thought would be easy -
and at this point - i'm starting to wonder...

I have a table setup, one column, ten rows
This sounds like element abuse: tables are supposed to contain tabular
data.
All the cells start off with a white background,
as the mouse passes over the cell, the background color
changes to a nice light blue. I have that working ok -

but the trick comes in as - when a user clicks in the
cell - i would like to change the background color to silver,
and when the user moves the mouse off of the cell - the background
will stay silver, until the user clicks another of the cells,
then that cell switches to silver, and the rest of the cells turn
to white...


Your specification lacks a little detail, so take a look and point out if
something needs changing that you can't fix yourself.

The demo page is here:

http://www.mlwinter.pwp.blueyonder.c...ell/table.html
The two script files used are:

http://www.mlwinter.pwp.blueyonder.c...arrell/core.js
http://www.mlwinter.pwp.blueyonder.c...rrell/cells.js

Be careful to note the function call in a script block at the end of the
HTML document. That is important, and must be placed below the table.

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.