doug wrote:
On Jul 7, 7:36 am, Stevo <n...@mail.invalidwrote:
>doug wrote:
>>What I would like to do is load the HTML into the lightbox div (a
scrollable one), then get the height of the content of the div (not
the height of the div itself which would is fixed).
Then I would like to resize the div to be the height of the content.
How can this be done? What are some attributes in the DOM that I
should look at besides height?
That all sounds like it'd be better off being asked in a lightbox forum.
I imagine that any "regular JS" that tries to find out (and modify)
anything about that DIV will be fighting lightbox's own code. Their API
should let you do things like that I would think.
The one I use does not allow you to do that. I have already made
several modifications to the code. I'm not sure what you mean by
"regular JavaScript." The only thing that the lightbox code uses is
regular javascript.
The reasonable assumption was/is that direct object access might interfere
with Lightbox as the latter would already implement mechanisms that modify
or watch for object's behavior and properties.
What I need is to figure out what part of the DOM would allow me to do
what I need to do.
It's not really so much a "lightbox" issue as it is the more general
question of finding out how much space something takes up.
It is not a language issue either, although it is considered somewhat
on-topic here as you intend to access the DOM API with client-side
ECMAScript-based scripting.
The offsetWidth, offsetHeight, clientWidth, clientHeight, scrollWidth,
scrollHeight, style.width, and style.height properties of your DOM element
object are your friends (provided they have not been tampered with or are
watched for by Lightbox).
This has been asked here before. *Numerous times.* Please read and take
heed of the FAQ (yes, *all of it*!) before you post here again:
<http://jibbering.com/faq/>
BTW, Lightbox is considered junk as it is requires both Prototype.js and
Script.aculo.us which are also considered junk. Search the archives.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16