473,322 Members | 1,241 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,322 software developers and data experts.

Making a whole table a link

Hi,
I want to make a whole table a link, so that clicking anywhere on it
takes you to another page. Unfortunately the way I initially thought of
doing this involved invalid html. I have tried a second valid way, but the
behaviour is not quite as good (at least not in firefox 1.5), with only the
actual text being links.

The examples of what I have tried can be found at

http://www.bytronic.com/tests/links.html

My question is - is there anything that can be added to the css of the
second example, to make it behave more like the whole table behaving as a
link? Would this be completely effective, or would I also need to add some
javascript?

Thanks in advance,

Martin

--
Martin Eyles
ma****@eyles.bytronic@com
try swapping dots and ats to email.
Jul 6 '06 #1
19 8056
"Martin Eyles" <ma**********@NOSPAMbytronic.comwrote:
I want to make a whole table a link, so that clicking anywhere on it
takes you to another page. Unfortunately the way I initially thought of
doing this involved invalid html.
Never mind validity for now, the problem here is more of a semantic and
UI nature. It's difficult to imagine how an entire table could be
semantically linked to another page or section. Additionally it would
likely cause users not to recognize such links.
>http://www.bytronic.com/tests/links.html
As per usual it's impossible to offer any meaningful advice if you don't
share what it is that you are actually trying to achieve. The bogus
content in the example doesn't allow us to see that.

--
Spartanicus
Jul 6 '06 #2

Martin Eyles wrote:
I want to make a whole table a link, so that clicking anywhere on it
takes you to another page.
You can't, at least if you want to use HTML links rather than JS, write
valid HTML, and expect to have it working everywhere. So instead you
need to use multiple <alinks, at least one in each <tdcell.
Boring, but basically simple.

Alternatively you can implement one (or more) through HTML links, then
add a JS link to the whole table through the relevant events. It
degrades without JS, but not unusably.

Jul 6 '06 #3
"Spartanicus" <in*****@invalid.invalidwrote in message
news:44********************************@4ax.com...
"Martin Eyles" <ma**********@NOSPAMbytronic.comwrote:
> I want to make a whole table a link, so that clicking anywhere on it
takes you to another page. Unfortunately the way I initially thought of
doing this involved invalid html.

Never mind validity for now, the problem here is more of a semantic and
UI nature. It's difficult to imagine how an entire table could be
semantically linked to another page or section. Additionally it would
likely cause users not to recognize such links.
>>http://www.bytronic.com/tests/links.html

As per usual it's impossible to offer any meaningful advice if you don't
share what it is that you are actually trying to achieve. The bogus
content in the example doesn't allow us to see that.
The table contains basic information about a machine, and there are several
machines laid out on the summary page. The target link will be a page with
more detailed information about the machine, which will include all the
table information and more. Therefore it will explain about the whole table,
which is why I felt the whole table should be a link.

Part of the reason for having the whole table clickable, even if I can't
code that semantic legally, is that I want it to be useable on touch screen
PCs, where a user might not accuratley press the centre of the table (and
thus where the second example might need several presses before the link is
followed).
Jul 6 '06 #4

<di*****@codesmiths.comwrote in message
news:11*********************@m79g2000cwm.googlegro ups.com...
>
Martin Eyles wrote:
> I want to make a whole table a link, so that clicking anywhere on it
takes you to another page.

You can't, at least if you want to use HTML links rather than JS, write
valid HTML, and expect to have it working everywhere. So instead you
need to use multiple <alinks, at least one in each <tdcell.
Boring, but basically simple.
This is what I do in the second example The problem is, that only the middle
bit of the table cell (ie. the bit with the text) is the link, not the
entire cell. If the entire cell were clickable, then the only problem would
be the borders between cells, and this would be more useable.
Alternatively you can implement one (or more) through HTML links, then
add a JS link to the whole table through the relevant events. It
degrades without JS, but not unusably.
Yes, I could do that to cover any "gaps" in the link area, but I want to get
as close to this without JS first. If I've already acheived this as well as
possible then fine. I'm just hoping I missed something.

Thanks,
Martin
Jul 6 '06 #5
Martin Eyles wrote:
I want to make a whole table a link, so that clicking anywhere on it
takes you to another page.
Just a thought: Create a transparent div with the table's dimensions and
link the div (or its contents, maybe a transparent graphic) to the new
page. Place the div over the table.

Or create a <mapelement with areas over the tables. Place it over the
page.

Since you are creating a touch-screen thing, I guess you know the
dimensions and probably the absolute positions.

- Daniel
Jul 6 '06 #6
Martin Eyles wrote:
>
The table contains basic information about a machine, and there are several
machines laid out on the summary page. The target link will be a page with
more detailed information about the machine, which will include all the
table information and more. Therefore it will explain about the whole table,
which is why I felt the whole table should be a link.

Part of the reason for having the whole table clickable, even if I can't
code that semantic legally, is that I want it to be useable on touch screen
PCs, where a user might not accuratley press the centre of the table (and
thus where the second example might need several presses before the link is
followed).
The best way to do that is to have a traditional link ("More details
about part XX3829") above or below or next to each table. Question: how
would users know to click (or touch) a table to get more information?
They know what links look like. They don't expect clicking a table to do
anything.
Jul 6 '06 #7
Martin Eyles wrote:
Hi,
I want to make a whole table a link, so that clicking anywhere on it
takes you to another page. Unfortunately the way I initially thought of
doing this involved invalid html. I have tried a second valid way, but the
behaviour is not quite as good (at least not in firefox 1.5), with only the
actual text being links.
I'd have said go with the working invalid html, but it's not working -
it's a mess in ie6/xp, mis-positioned and while hovering (sometimes)
shows you where you'll go, actually clicking does nothing.

So - not sure - perhaps a transparent gif positioned over the table, and
clickable ? But that would probably stop tooltips working within.

Probably best is js, with a <noscript><a ...>Click here for more
information about</a></noscriptpositioned below the table, or similar.

Chris
Jul 6 '06 #8
Martin Eyles wrote:
Part of the reason for having the whole table clickable, even if I can't
code that semantic legally, is that I want it to be useable on touch screen
PCs,
Important question: What control do you have over the screens (browser,
viewport etc) that are going to be touched? Are they part of the
inventory in a lobby in an entreprise or something?

You should probably go for two versions: touch screen and click screen.

- Daniel
Jul 6 '06 #9
Harlan Messinger wrote:
Question: how
would users know to click (or touch) a table to get more information?
They know what links look like. They don't expect clicking a table to do
anything.

If you take a look at the site http://www.bytronic.com/ and, e.g.,
http://www.bytronic.com/products.html, you will see right away where you
can and should click. And those are obviously buttons with finger tips
in mind (not only mouse).

So if a table has, e.g., a thick blue border, and the rest of the page
is designed with finger tips in mind, AND the user is standing in front
of a touch screen, I'd have to agree with Martin and say that a linked
table would in fact be an intuitive thing to write. Then a clicked table
would obviously be expected to do anything.

- Daniel
Jul 6 '06 #10
"Martin Eyles" <ma**********@NOSPAMbytronic.comwrote:
>>>http://www.bytronic.com/tests/links.html

As per usual it's impossible to offer any meaningful advice if you don't
share what it is that you are actually trying to achieve. The bogus
content in the example doesn't allow us to see that.

The table contains basic information about a machine, and there are several
machines laid out on the summary page. The target link will be a page with
more detailed information about the machine, which will include all the
table information and more. Therefore it will explain about the whole table,
which is why I felt the whole table should be a link.
That doesn't go anywhere near to explaining what it is that you are
actually trying to do. An URL to a page with real content is needed.

--
Spartanicus
Jul 6 '06 #11

"Daniel Jung" <ju**@uib.nowrote in message
news:44********@news.broadpark.no...
Harlan Messinger wrote:
>Question: how would users know to click (or touch) a table to get more
information? They know what links look like. They don't expect clicking a
table to do anything.
Many of the user of this system (mainly those using touch screens) will be
used to pressing on what looks like tables for more data in another system.
For those that aren't (mainly any desktop users) though, I might put in
instructions that explain where to click. Alternitivley, I may employ the
method suggested below
If you take a look at the site http://www.bytronic.com/ and, e.g.,
http://www.bytronic.com/products.html, you will see right away where you
can and should click. And those are obviously buttons with finger tips in
mind (not only mouse).

So if a table has, e.g., a thick blue border,
Thanks, may use this in some places. A blue underline on the caption, and a
blue border round the table (much the way it is done with pictures) should
help the desktop users.
and the rest of the page is designed with finger tips in mind, AND the
user is standing in front of a touch screen, I'd have to agree with Martin
and say that a linked table would in fact be an intuitive thing to write.
Then a clicked table would obviously be expected to do anything.
Thanks for "getting" what I'm trying to acheive.

Martin
Jul 6 '06 #12

"Daniel Jung" <ju**@uib.nowrote in message
news:44********@news.broadpark.no...
Martin Eyles wrote:
>Part of the reason for having the whole table clickable, even if I can't
code that semantic legally, is that I want it to be useable on touch
screen PCs,

Important question: What control do you have over the screens (browser,
viewport etc) that are going to be touched? Are they part of the inventory
in a lobby in an entreprise or something?
Grubby factory floor for some, nice offices for others, but running the same
system.
You should probably go for two versions: touch screen and click screen.
Yes, I may well do this. Starting with the touch screen stuff first, but I
will tweak for the desktop later.

Martin
Jul 6 '06 #13
"Spartanicus" <in*****@invalid.invalidwrote in message
news:28********************************@4ax.com...
"Martin Eyles" <ma**********@NOSPAMbytronic.comwrote:
>>>>http://www.bytronic.com/tests/links.html

As per usual it's impossible to offer any meaningful advice if you don't
share what it is that you are actually trying to achieve. The bogus
content in the example doesn't allow us to see that.

The table contains basic information about a machine, and there are
several
machines laid out on the summary page. The target link will be a page with
more detailed information about the machine, which will include all the
table information and more. Therefore it will explain about the whole
table,
which is why I felt the whole table should be a link.

That doesn't go anywhere near to explaining what it is that you are
actually trying to do. An URL to a page with real content is needed.
I've explained as best I can. I don't really have full content to give at
the moment for this project. I think though some others have more idea what
I want, so I'll use that to get it working. Thanks for trying to dig out
exactly what I'm trying to do - it has been useful to clarify things.

Martin
Jul 6 '06 #14

"Daniel Jung" <ju**@uib.nowrote in message
news:44********@news.broadpark.no...
Martin Eyles wrote:
> I want to make a whole table a link, so that clicking anywhere on it
takes you to another page.

Just a thought: Create a transparent div with the table's dimensions and
link the div (or its contents, maybe a transparent graphic) to the new
page. Place the div over the table.
Like this idea. I've updated the page
(http://www.bytronic.com/tests/links.html) with a third version. It's
slightly modified from this, but I think is quite neat. It works great in
firefox, but there's still an issue with internet explorer 6 (it needs to
work in this for the touchscreen PCs). The link is hiding behind the table
in IE. Any idea how to bring it in front of the table (I tried with z-index,
but failed - could have been z-indexing in the wrong way though.).
Or create a <mapelement with areas over the tables. Place it over the
page.

Since you are creating a touch-screen thing, I guess you know the
dimensions and probably the absolute positions.
Would probably work, but I think a bit fiddly, so I'll use the other idea
you suggested.

Thanks,
Martin
Jul 6 '06 #15

"Chris Sharman" <ch***********@sorry.nospamwrote in message
news:e8*******************@news.demon.co.uk...
Martin Eyles wrote:
>Hi,
I want to make a whole table a link, so that clicking anywhere on it
takes you to another page. Unfortunately the way I initially thought of
doing this involved invalid html. I have tried a second valid way, but
the behaviour is not quite as good (at least not in firefox 1.5), with
only the actual text being links.

I'd have said go with the working invalid html, but it's not working -
it's a mess in ie6/xp, mis-positioned and while hovering (sometimes) shows
you where you'll go, actually clicking does nothing.
Works in firefox 1.5, but you're right, not in IE6. That is a problem, but
hopefully the third version will work.
So - not sure - perhaps a transparent gif positioned over the table, and
clickable ? But that would probably stop tooltips working within.
Aren't any tooltips to show, so not a problem. Tried a variation on this -
see my other replies.
Probably best is js, with a <noscript><a ...>Click here for more
information about</a></noscriptpositioned below the table, or similar.
This is a last resort method. I'll consider, but only if I can't find a
better way

Thanks,
Martin
Jul 6 '06 #16
Deciding to do something for the good of humanity, Martin Eyles
<ma**********@NOSPAMbytronic.comdeclared in
comp.infosystems.www.authoring.stylesheets:
http://www.bytronic.com/tests/links.html

My question is - is there anything that can be added to the css of the
second example, to make it behave more like the whole table behaving as a
link?
#div2 a {display: block; width: 100%;} appears to do the trick in FF1.5
and IE6 - the only downside is that the borders between cells aren't
links. I haven't checked other browsers.

--
Mark Parnell
My Usenet is improved; yours could be too:
http://blinkynet.net/comp/uip5.html
Jul 6 '06 #17
Daniel Jung wrote:
Harlan Messinger wrote:
>Question: how would users know to click (or touch) a table to get more
information? They know what links look like. They don't expect
clicking a table to do anything.


If you take a look at the site http://www.bytronic.com/ and, e.g.,
http://www.bytronic.com/products.html, you will see right away where you
can and should click.
Right, there is text that says "Click here". It wasn't until the second
time I looked that I realized you might be referring to the images, and
only then did I discover that they too were clickable. I don't see why
you feel that a page that has text links that say "Click here"
demonstrates that users will know to click tables on a page that doesn't
have those.

And those are obviously buttons with finger tips
in mind (not only mouse).

So if a table has, e.g., a thick blue border, and the rest of the page
is designed with finger tips in mind, AND the user is standing in front
of a touch screen, I'd have to agree with Martin and say that a linked
table would in fact be an intuitive thing to write. Then a clicked table
would obviously be expected to do anything.
I've never seen a table on a web page that I thought ought to be
clicked. If I did think so, then I'd be spending an awful lot of time
clicking tables that aren't linked, wouldn't I, considering that tables
generally aren't linked.
Jul 7 '06 #18

"Harlan Messinger" <hm*******************@comcast.netwrote in message
news:4h*************@individual.net...
Daniel Jung wrote:
>Harlan Messinger wrote:
>>Question: how would users know to click (or touch) a table to get more
information? They know what links look like. They don't expect clicking
a table to do anything.


If you take a look at the site http://www.bytronic.com/ and, e.g.,
http://www.bytronic.com/products.html, you will see right away where you
can and should click.

Right, there is text that says "Click here". It wasn't until the second
time I looked that I realized you might be referring to the images, and
only then did I discover that they too were clickable. I don't see why you
feel that a page that has text links that say "Click here" demonstrates
that users will know to click tables on a page that doesn't have those.
This page with the images isn't part of my particular query (if you look at
the original post). Nevertheless, thanks for your comment.
>And those are obviously buttons with finger tips
in mind (not only mouse).

So if a table has, e.g., a thick blue border, and the rest of the page is
designed with finger tips in mind, AND the user is standing in front of a
touch screen, I'd have to agree with Martin and say that a linked table
would in fact be an intuitive thing to write. Then a clicked table would
obviously be expected to do anything.

I've never seen a table on a web page that I thought ought to be clicked.
If I did think so, then I'd be spending an awful lot of time clicking
tables that aren't linked, wouldn't I, considering that tables generally
aren't linked.
Re: the tables. I have a user base that _will_ be used to clicking tables
(using touch screens). I think making the caption look like a link should
help new user with different expectations (who will be using desktops, and
thus be able to click on this text).
Jul 10 '06 #19

"Mark Parnell" <we*******@clarkecomputers.com.auwrote in message
news:1s****************@markparnell.com.au...
Deciding to do something for the good of humanity, Martin Eyles
<ma**********@NOSPAMbytronic.comdeclared in
comp.infosystems.www.authoring.stylesheets:
>http://www.bytronic.com/tests/links.html

My question is - is there anything that can be added to the css of the
second example, to make it behave more like the whole table behaving as a
link?

#div2 a {display: block; width: 100%;} appears to do the trick in FF1.5
and IE6 - the only downside is that the borders between cells aren't
links. I haven't checked other browsers.
Thanks,
that now gives me two options. I'll tweak and see which one works best
for me.
Jul 10 '06 #20

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

Similar topics

0
by: |-|erc | last post by:
Hi! Small challenge for you. The index.php uses this file and calls layout(). Take a look at www.chatty.net this file draws the chat login box on the right. I traced the CHAT button it submits...
13
by: Ben Sharvy | last post by:
Is there a list of the changes you need to make to HTML 4.1 cose to make it dual compliant, with XHTML 1.1 also?
3
by: Thomas Mlynarczyk | last post by:
Hello, How can I make an <a> element (containing text only, styled to be a box with a border) as big as the table cell in which it resides, *without* having specified any width/height (neither...
8
by: Nicolás Lichtmaier | last post by:
Hi, some time ago I've written an article about this issue. It explain some differences in Explorer's and Mozilla's JavaScript/DOM. It has recently changed its URL, This is the new one: ...
7
by: Sens Fan Happy In OH | last post by:
I'm having majour issues with FrontPage 2K and a webpage that I am having to create from scratch based on someone else's prior work. I hope someone can look at the source code for the page in...
3
by: Sandy Bremmer | last post by:
I was curious how one goes about properly creates a table row with multiple TD cells as a single hyperlink because I have seen examples of what I think is invalid and poorly conceived HTML. It...
19
by: Christian Fowler | last post by:
I have a VERY LARGE pile of geographic data that I am importing into a database (db of choice is postgres, though may hop to oracle if necessary). The data is strictly hierarchical - each node has...
3
by: piscogirl | last post by:
Hi there, I am about to build a small db in Access. Among the tables I plan to have are a Person table, an Event table, and an EventRegistration table. The EventRegistration table will...
25
by: nitinpatel1117 | last post by:
I need to make a whole div, become a link. i currently have the code <a href="temp.html"><div>some text</div></a> but this does not validate as xhtml strict. putting the link in the div...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.