Current location: Hot Scripts Forums » General Web Coding » JavaScript » Determine what cell in a table was clicked


Determine what cell in a table was clicked

Reply
  #1 (permalink)  
Old 02-13-04, 09:54 AM
mtilori mtilori is offline
New Member
 
Join Date: Feb 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Determine what cell in a table was clicked

I am tring to write a web page that accesses a database and displays a table containing name and address information.

I have the table pulling the name/address info and displaying it. How do I determine what name was clicked in order to pass that name to a new screen? I am using HTML/JavaScript/JavaScriptlet. Any information would be appreciated.
Reply With Quote
  #2 (permalink)  
Old 02-16-04, 01:48 AM
sma sma is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
You can access event.srcElement property in the event hadler of onclick event of table. My suggestion is to use innerText property or another properties/attributes (if you don't want you can use user-defined properties/attibutes) to have the data you want.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Validator ctrl in table cell : Strange behaviour sunny_doncaster ASP.NET 6 07-31-08 09:43 AM
auto table resize derick_2k JavaScript 4 04-26-04 02:32 PM
Upload file to table so ONLY files tied to primary key are displayed in record? grafixDummy PHP 4 12-20-03 04:28 PM
strange grey "extra" table area... skyraider HTML/XHTML/XML 1 12-10-03 10:55 PM
moving data from table to table ..please help! geneane ASP 2 09-22-03 07:02 PM


All times are GMT -5. The time now is 02:05 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.