Topic: Making a cell clickable Pages that link to <a href="https://ozoneasylum.com/backlink?for=9564" title="Pages that link to Topic: Making a cell clickable" rel="nofollow" >Topic: Making a cell clickable\

 
Author Thread
BlueHarvest
Nervous Wreck (II) Inmate

From: Västerås, Sweden
Insane since: Dec 2002

IP logged posted posted 12-03-2002 11:57 Edit Quote

Does anyone have any bright ideas about how to make an entire tablecell clickable?

Basically I need to put a href around the whole thing... sounds easy enough eh? Well, the problem is that the solution needs to work in the latest browsers as well as older ones as far back as NS4.6.

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

IP logged posted posted 12-03-2002 12:23 Edit Quote

I'm not sure if this works in NN4, but in all the newer ones it should do the job:

<td onclick="location.href='anotherpage.html';">
<p>Cell Contents</p>
</td>

I'll see if I can find that old magazine CD I had lying around here and get that oldie installed again.

[edit: No luck...]



[This message has been edited by kuckus (edited 12-03-2002).]

BlueHarvest
Nervous Wreck (II) Inmate

From: Västerås, Sweden
Insane since: Dec 2002

IP logged posted posted 12-03-2002 14:21 Edit Quote

Hallo kuckus and thanks for your reply.

Unfortunately I've already tried something similar as well as your suggestion and it doesn't work in NN4.x. Wish I could ignore it but compatibility with NN4 is a requirement. :-( Thanks for trying though.



[This message has been edited by BlueHarvest (edited 12-03-2002).]

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

IP logged posted posted 12-03-2002 15:41 Edit Quote

Hmmm... I think the problem is that NN4 doesn't allow onclick in many places, like only in <a> and <div> and a few other tags.

What exactly are you going to put into the table cells? Nothing but the links? Then you could try to put the onclick=... into the <a> tags and see if Netscape can stretch their width to 100% via CSS to make the whole cell clickable. Or you could see if putting a <div> with the onlick event handler around the whole content of the cell does the trick.

BlueHarvest
Nervous Wreck (II) Inmate

From: Västerås, Sweden
Insane since: Dec 2002

IP logged posted posted 12-03-2002 17:54 Edit Quote

Yeah, I thought of that too and fiddled with various width 100% solutions but had no luck.

The table is a long row of cells with one cell for each day in a calendar. The cells contain a couple of database queries which generate output in text. Some of the text is linked to pages generated by the database and some of the text is plain.

Rather than just making all the text clickable it would have been a neater solution to just have the entire cell clickable. No problem in IE but NN completely fouls the job.

brucew
Paranoid (IV) Inmate

From: North Coast of America
Insane since: Dec 2001

IP logged posted posted 12-04-2002 04:43 Edit Quote

Does the solution just have to work in NN4 without any adverse effects (in other words, degrade gracefully in NN4), or does it have to work in NN4 *exactly* the way it does in a contemporary browser?

If the latter, skip this. If the former...

TD A {
display: block;
}

This makes the whole cell clickable (assuming the entire cell contents are contained within the <a> tag) in a contemporary browser and in NN4, IE4 and Opera 5 & 6, only the text is clickable as it is in an ordinary link.

BlueHarvest
Nervous Wreck (II) Inmate

From: Västerås, Sweden
Insane since: Dec 2002

IP logged posted posted 12-04-2002 11:02 Edit Quote

That's defenetly a step in the right direction. Just as long as it doesn't look somepletely trashed in NN4 it's okay. Thanks for the idea!!

brucew
Paranoid (IV) Inmate

From: North Coast of America
Insane since: Dec 2001

IP logged posted posted 12-04-2002 19:12 Edit Quote

It's one of my favorites. I use it in calendar grids too. It also works nicely in DIVs.

I learned it at http://www.meyerweb.com/eric/css/edge/ Lotsa neat stuff there.

BlueHarvest
Nervous Wreck (II) Inmate

From: Västerås, Sweden
Insane since: Dec 2002

IP logged posted posted 12-05-2002 08:47 Edit Quote

Cool! Thanks for the link. I'm always looking for inspiration and I loved their demos.

Bmud
Bipolar (III) Inmate

From: Raleigh, NC
Insane since: Mar 2001

IP logged posted posted 12-11-2002 03:40 Edit Quote

This is interesting. I recall hotmail implimenting this feature befor they revamped everything, and it was up for quite a while. That must have been cross-browser compatible.

Do yourself a favor and consult the super-colossal msdn (microsoft developer's network) You may find at first a javascript that is only friendly to the new IE6, but most times there are more than one solution presented.


Hey, Nice sig Brucew ^_~

Shine and shine.
[Cell=992]

BlueHarvest
Nervous Wreck (II) Inmate

From: Västerås, Sweden
Insane since: Dec 2002

IP logged posted posted 12-16-2002 15:24 Edit Quote

Cheers mate, I'll try that. :-)



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu