This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Anchor tag for row in html table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Anchor tag for row in html table" Watch "Anchor tag for row in html table" New topic
Author

Anchor tag for row in html table

Vivian Josh
Ranch Hand

Joined: Oct 31, 2006
Posts: 112
Hi Ranchers,

I am trying to implement following functionality for which I need some help.

1) When I click anywhere on the row in html table I need to open same page.
-> I tried putting <tr> inside <a> tag but its not working
2) I also want to send some hidden information eg. someID associated with each row.
-> I tried putting <INPUT type="HIDDEN"> but don't know whether its correct.

Can someone give me some hints on how to achieve this?

Thanks,
Vivian
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Put an onclick handler on the <tr> and do whatever you want in the handler.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vivian Josh
Ranch Hand

Joined: Oct 31, 2006
Posts: 112
Originally posted by Bear Bibeault:
Put an onclick handler on the <tr> and do whatever you want in the handler.



Thanks Bear for this pointer

Is it correct to send "hidden" element in <tr> ?

eg:
<tr>
<inuput type="hidden" name="" value="">
</tr>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Hidden elements have nothing to do with <tr>'s but with forms. How are you planning to initiate the request to the server?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
http://radio.javaranch.com/pascarello/2005/05/19/1116509823591.html

Eric
Vivian Josh
Ranch Hand

Joined: Oct 31, 2006
Posts: 112


Thanks Eric ! Thats really wonderful work. I wanted to do just that !

- Vivian
Mark Stewart
Greenhorn

Joined: Nov 19, 2007
Posts: 1
Thanks i needed that too !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Anchor tag for row in html table
 
Similar Threads
Help me to have a sortable table in my html profile!
how to add checkbox html tag?- urgent!
struts 2 iteration with inputs
xsl: create href for one tag with value in param among multiple
JDBC-3 Design Question