[Javascript] is their a javascript function, or DOMproperty to find the char limit of a table cell or div?

Paul Novitski paul at juniperwebcraft.com
Wed Jan 31 12:32:01 CST 2007


At 1/31/2007 02:24 AM, Lee Bettridge wrote:
>Paul,
>
>You were correct in that "It sounds like Lee is visualizing a page-up,
>page-down scenario in which the scrolling text moves up or down" and I
>move the text about half the height of the div tag so the user does not
>get lost.
>
>You were also correct in that the TV Browser does not 'to my knowledge',
>allow for font resizing or customizing, as text on a tv screen must be
>more constrained to remain readable.
>
>My problem is that the user can scroll down through the text and then
>keep scrolling down for ever, as I have no way of knowing when the text
>has finished, and no way of 'cutting' the text into pages so I can count
>them.


This doesn't sound like a problem.  Since the text will be a fixed 
size, you'll determine that size (won't you?) in pixels and therefore 
you'll know exactly how tall a windowpane-sized chunk will be.  You 
know the height of the text block, you know the height of the 
windowpane in which the text block is scrolling, and you know which 
chunk of the textblock you're currently showing.  When the 
currentChunk * (windowpaneHeight + 1) >= textHeight then you can't 
scroll any more.

If this model doesn't fit your situation, then perhaps you could give 
us a look at a demo page that truly illustrates your dilemma.

Regards,

Paul
__________________________

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com 




More information about the Javascript mailing list