473,399 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Capture server event when a user clicks a <TD>?

If I want to have the form submit when a user clicks on table cell as follows
on a menu something like..

<td style="cursor:hand;" onmouseover="this.style.backgroundColor='white'"
onmouseout="this.style.backgroundColor='blue'" id="ProductList"
onclick="__doPostBack('ProductList', '')">View Product List</td>

Is checking the _EVENTTARGET in the Page_Load the only way to determine that
it was clicked?

If Request.Form("__EVENTTARGET") = "'ProductList'" Then ...

Or can I somehow wireup the an event?

Thanks
Nov 19 '05 #1
1 1135
If you add the tags runat="server" and id="some_value" the TD can be treated
as if it is a server side tag. Assigning a click is pretty straight-forward
from that point, as it will behave as any other server-side element will.

F Buchan

"Dave" <Da**@discussions.microsoft.com> wrote in message
news:C2**********************************@microsof t.com...
If I want to have the form submit when a user clicks on table cell as
follows
on a menu something like..

<td style="cursor:hand;"
onmouseover="this.style.backgroundColor='white'"
onmouseout="this.style.backgroundColor='blue'" id="ProductList"
onclick="__doPostBack('ProductList', '')">View Product List</td>

Is checking the _EVENTTARGET in the Page_Load the only way to determine
that
it was clicked?

If Request.Form("__EVENTTARGET") = "'ProductList'" Then ...

Or can I somehow wireup the an event?

Thanks

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Terry | last post by:
hi guys, could anyone help me with this? I tried to put a <div> in a <td>, and a <table> in that <div>. It looks fine, but my div can't fit in my <td>, there's always a space between the bottom of...
0
by: Matt Adams | last post by:
I want to move the following <PRE> defintion to a css file: <TABLE><TR><TD><PRE>sample text</PRE></TD> <TD> not predefined font</TD></TR></TABLE> should be <TABLE><TR><TD class=aaa>sample...
3
by: RC | last post by:
I have a very sime html table like <html><head><title>My Table</title> <style> input { margin: 0; padding: 0; border-width: 0; text-indet: 0; text-align: left } </style></head><body> <table...
3
by: Henry Johnson | last post by:
Okay - I'm spinning my wheels on this one... can someone help me figure out how to programmatically populate a table cell as follows (from C# code-behind)? I've tried using a Literal control in the...
2
by: petereffect | last post by:
i have foll. code <tr> <a href="a1.shtml"> <td width='100%'> &nbsp;"+Testing+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td> </a>
5
by: mahesr | last post by:
I want to match some particular text between <tr>and </tr> or <td>and </td>.... in PHP. like below............ <table><tr> CATEGORY: <td><font face="Verdana" size="1" color="#A000A0"> Wedding...
4
George Lft
by: George Lft | last post by:
I'm new at building table. Mostly PHP programming . Now I can't seem to fix the size of my table row and column. Any idea? <h4>Two rows and three columns:</h4> <table border="1"> <tr> ...
7
by: Xiaoyan | last post by:
Hi,everyone: I have a problem now. I can't get the information between the <tr><td> and </td></tr>. for example: I use this regular expression can't get it, I don't know why....
4
by: harryusa | last post by:
I am trying to center 2 images concentrically which are z-indexed to lay on top of each other making an image with a border from another image that has a transparent center. I need the images to be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.