Making a TableCell Appear Clickable

N

Nathan Sokalski

I have navigation that is made out of a table. I did this so that I could
dynamically create my "buttons" (the cells formatted using CSS) and avoid
creating a new graphic every time I changed the text of a button. However,
because TableCells are not clickable, this only allows the user to click on
the text used in the button. Because all my buttons are the same size, I was
wondering if there was a way to detect when and where (get the X & Y
coordinates) the user clicked and possibly use those to give the same
effect. Because the table containing the "buttons" will be in a User
Control, I do not have to worry about placement or the user's screen size.
But I am unsure if there is a way to get these coordinates from a click
event when the table does not have a click event? Any ideas? Thanks.
 
E

Eliyahu Goldin

Nathan,

TableCell is as clickable as any other html control. Just add "onclick"
attribute and provide a javascript handler for client-side onclick event.
You don't even need to pace any buttons inside the cells.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top