faqts : Computers : Programming : Languages : JavaScript : DHTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 5 people (40%) answered Yes
Recently 2 of 5 people (40%) answered Yes

Entry

How can I dynamically show a "more" link (link to a different page) if text exceeds a <DIV>?

Jun 28th, 2002 03:22
Gareth Hay, Techno Animal,


I suspect you are really asking how do you test if the contents are 
greater than the visible region.

document.all.testDiv.scrollHeight>document.all.testDiv.offsetHeight (or 
clientHeight)

then just show a div with a link in it.