aspose file tools*
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
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: 61766
    
  67

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: 61766
    
  67

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