Connecting Tech Pros Worldwide Help | Site Map

Click in a <TD> tag

Magnus Blomberg
Guest
 
Posts: n/a
#1: Nov 19 '05
Hello!

I have a table with several rows with text. I want to make the complete cell
(or row) clickable as a link/href.
Writing <a href...><td>bla bla</td></a> is not possible.

If this is possible I have to add several spaces to the text (bla
) to make the clickable area larger.
If I have to do this, how to disable the feature that formats the text as a
link (becames blue and underlined).

How to solve this? Please don't make me create pictures for all cells.
Regards Magnus


srini
Guest
 
Posts: n/a
#2: Nov 19 '05

re: Click in a <TD> tag


Hi magnus,
1)You can try to place a div inside the td with width and height 100% and
use the onclick of the div tag.
<table><tr><td width="100" height="100">
<div onclick="javascript:alert('h')" style = "width:100;height:100">bla
bla</div>
</td></tr></table>
or
2)You can use a style sheet to cancel the formatting for the hyperlinks and
make them appear as plain text.
--
HTH
srini
http://www.expertszone.com


"Magnus Blomberg" wrote:
[color=blue]
> Hello!
>
> I have a table with several rows with text. I want to make the complete cell
> (or row) clickable as a link/href.
> Writing <a href...><td>bla bla</td></a> is not possible.
>
> If this is possible I have to add several spaces to the text (bla
> ) to make the clickable area larger.
> If I have to do this, how to disable the feature that formats the text as a
> link (becames blue and underlined).
>
> How to solve this? Please don't make me create pictures for all cells.
> Regards Magnus
>
>
>[/color]
Curt_C [MVP]
Guest
 
Posts: n/a
#3: Nov 19 '05

re: Click in a <TD> tag


<td>
<a href=# style="width:100%;text-decoration:none;">blah</a>
</td>

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com



"Magnus Blomberg" wrote:
[color=blue]
> Hello!
>
> I have a table with several rows with text. I want to make the complete cell
> (or row) clickable as a link/href.
> Writing <a href...><td>bla bla</td></a> is not possible.
>
> If this is possible I have to add several spaces to the text (bla
> ) to make the clickable area larger.
> If I have to do this, how to disable the feature that formats the text as a
> link (becames blue and underlined).
>
> How to solve this? Please don't make me create pictures for all cells.
> Regards Magnus
>
>
>[/color]
Cowboy (Gregory A. Beamer) - MVP
Guest
 
Posts: n/a
#4: Nov 19 '05

re: Click in a <TD> tag


You have to use JavaScript for this type of action, as you cannot surround a
table cell with a anchor tag (a href="").

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************


"Magnus Blomberg" wrote:
[color=blue]
> Hello!
>
> I have a table with several rows with text. I want to make the complete cell
> (or row) clickable as a link/href.
> Writing <a href...><td>bla bla</td></a> is not possible.
>
> If this is possible I have to add several spaces to the text (bla
> ) to make the clickable area larger.
> If I have to do this, how to disable the feature that formats the text as a
> link (becames blue and underlined).
>
> How to solve this? Please don't make me create pictures for all cells.
> Regards Magnus
>
>
>[/color]
Ray Costanzo [MVP]
Guest
 
Posts: n/a
#5: Nov 19 '05

re: Click in a <TD> tag


<td onclick="alert('Thanks for the click.');" style="cursor: pointer;">some
text</td>

Ray at work

"Magnus Blomberg" <magnus.blomberg@skanska.se> wrote in message
news:%23Rs4l$W1FHA.1256@TK2MSFTNGP09.phx.gbl...[color=blue]
> Hello!
>
> I have a table with several rows with text. I want to make the complete
> cell
> (or row) clickable as a link/href.
> Writing <a href...><td>bla bla</td></a> is not possible.
>
> If this is possible I have to add several spaces to the text (bla
> ) to make the clickable area larger.
> If I have to do this, how to disable the feature that formats the text as
> a
> link (becames blue and underlined).
>
> How to solve this? Please don't make me create pictures for all cells.
> Regards Magnus
>
>[/color]


Magnus Blomberg
Guest
 
Posts: n/a
#6: Nov 19 '05

re: Click in a <TD> tag



Thanks everyone! It helped me!
Regards Magnus


*** Sent via Developersdex http://www.developersdex.com ***
Closed Thread