Microsoft Content Management Server - Access scrollHeight of NRDynHtml object???

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > April 2004 > Access scrollHeight of NRDynHtml object???





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Access scrollHeight of NRDynHtml object???
Clif Peterson

2004-04-29, 3:35 am

Stefan,

In the browser javascript, does the NRDynHtml (HtmlPlaceholder) object expose a property with the same function as scrollHeight does on other HTML elements?

What I want to do is at the time a page is loaded in Edit mode, if the content inside a placeholder is taller than the height of the placeholder (scrollHeight > height), then I change the placeholder height to match the scrollHeight (if scrollHeight was a
vailable).

What I'm doing now is putting the NRDynHtml.html into the innerHTML of a hidden DIV tag with Overflow set to auto. I then check the Div.scrollHeight against the NRDynHtml.height and adjust the placeholder as necessary.

The problem is that due to how the placeholder does not always display the encapsulated HTML in exactly the same way as is done out on the body of the page, the height from the DIV does not always match the height in the placeholder, so I either have blan
k space at the bottom of the placeholder or have a small portion of the text scrolled beyond the bottom.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com