all groups > dotnet jscript > january 2006 >
You're in the

dotnet jscript

group:

check Overflow for <DIV>



check Overflow for <DIV> Charlie Hoo
1/7/2006 2:02:49 PM
dotnet jscript: Hello,

In DHMTL page, I have "<DIV style='width=100px;overflow:hidden'
id=divTest>test test test test</DIV>", I need to check if all text within
"<DIV>" and "</DIV>" is displayed; in other words, check if any charactor is
hidden. Could you tell how to check it by using javacript? Thanks a lot.

Charlie

RE: check Overflow for <DIV> lukezhan NO[at]SPAM online.microsoft.com
1/9/2006 8:14:49 AM
We can't do this, unless the font size is hard code,and the user have same
moniter with fixed resolution. And then only if you examine the exact pixel
height and width for that particular size up front.

Can't you solve this another way instead? Autoscroll? Grow the div
vertically?

Luke
Re: check Overflow for <DIV> Bruce Barker
1/9/2006 3:22:40 PM
yes, in javascript just compare the divs clientHeight to its scrollHeight.


-- bruce (sqlwork.com)


[quoted text, click to view]

Re: check Overflow for <DIV> Charlie Hoo
1/12/2006 3:45:39 PM
Bruce,

Thanks a lot. It works very well.

Charlie

[quoted text, click to view]

AddThis Social Bookmark Button