Closed Thread Icon

Preserved Topic: any similar or denser/newer than this dhtmllib.js ? Pages that link to <a href="https://ozoneasylum.com/backlink?for=18282" title="Pages that link to Preserved Topic: any similar or denser/newer than this dhtmllib.js ?" rel="nofollow" >Preserved Topic: any similar or denser/newer than this dhtmllib.js ?\

 
Author Thread
lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 10-25-2001 13:49
quote:
Library Functions

Here's a full list of the functions provided, what they do and the parameters required.

Visibility


hideLayer(layer)
Makes the layer invisible.

showLayer(layer)
Makes the layer visible.

inheritLayer(layer)
Sets the layer so that it will the inherit the visibility of it's parent.

getVisibility(layer)
Returns one of "visible", "hidden" or "inherit" depending on the layer's current visibility setting. Note that in IE, this value may not be correct unless you have explicitly set the layer's visibility with one of the above functions.

Positioning


moveLayerTo(layer, x, y)
Positions the upper left corner of the layer to the specified coordinates relative to it's parent container.

moveLayerBy(layer, dx, dy)
Moves the layer within it's parent containter by the specified dx and dy distances.

getLeft(layer)
Returns the x-coordinate of the layer's left edge relative to it's parent container.

getTop(layer)
Returns the y-coordinate of the layer's top edge relative to it's parent container.

getRight(layer)
Returns the x-coordinate of the layer's right edge relative to it's parent container.
Note that this value is derived from the layer's width, see getWidth().

getBottom(layer)
Returns the y-coordinate of the layer's bottom edge relative to it's parent container.
Note that this value is derived from the layer's height, see getHeight().

getPageLeft(layer)
Returns the x-coordinate of the layer's left edge relative to the page. This is useful for determining the absolute position on the page of a nested layer.

getPageTop(layer)
Returns the y-coordinate of the layer's top edge relative to the page. This is useful for determining the absolute position on the page of a nested layer.

getWidth(layer)
Returns the width of the layer's contents in pixels.

getHeight(layer)
Returns the height of the layer's contents in pixels.

getzIndex(layer)
Returns the z-index value of the layer. A layer with a higher value will be displayed over any one with lower value.

setzIndex(layer, z)


Sets the z-index value of the layer to the value given. A layer with a higher value will be displayed over any one with a lower value.

Clipping


clipLayer(layer, left, top, right, bottom)
Sets the clipping (or visible) region for the layer to the specified coordinates. Note that the clipping coordinates are relative to the layer contents, not the page.

getClipLeft(layer)
Returns the x-coordinate of the top-left corner of the layer's clipping region. This coordinate is relative to the layer's contents, not it's parent container.
Note that in IE, this value may not be correct unless you have explicitly set the layer's clipping area.

getClipTop(layer)
Returns the y-coordinate of the top-left corner of the layer's clipping region. This coordinate is relative to the layer's contents, not it's parent container.
Note that in IE, this value may not be correct unless you have explicitly set the layer's clipping area.

getClipRight(layer)
Returns the x-coordinate of the bottom-right corner of the layer's clipping region. This coordinate is relative to the layer's contents, not it's parent container.
Note that in IE, this value may not be correct unless you have explicitly set the layer's clipping area.

getClipBottom(layer)
Returns the y-coordinate of the bottom-right corner of the layer's clipping region. This coordinate is relative to the layer's contents, not it's parent container.
Note that in IE, this value may not be correct unless you have explicitly set the layer's clipping area.

Scrolling


scrollLayerTo(layer, x, y, bound)
Scrolls the contents of the layer to the specified coordinates. This is done by changing the position of the layer relative to the page and then setting it's clipping region so that the viewable region appears static on the page. If bound is set to true, the layer will not be scrolled past it's edges.
Note: You should position and set the clipping region of the layer before calling this function.

scrollLayerBy(layer, dx, dy, bound)
Scrolls the contents of the layer by the specified distances. See the scrollLayerTo() function for details. If bound is set to true, the layer will not be scrolled past it's edges.
Note: You should position and set the clipping region of the layer before calling this function.

Background


setBgColor(layer, color)
Sets the background color of the layer to the specified color.

setBgImage(layer, src)
Sets the background image of the layer to the image specified by the src url.

Layer Utilities


getLayer(name)
Returns a handle to the positioned element with the given name. The element may be nested within other positioned elements.
Note that names should be unique within a given document.

Image Utilities


getImage(name)
Returns a handle to the image with the given name. The image maybe nested within positioned elements.
Note that names should be unique within a given document.

getImagePageLeft(img)
Returns the x-coordinate of the given image's left edge relative to the page. Similar to the getPageLeft() for layers.
Note that the image reference passed to the function must be a handle returned by the getImage() function. If not, the value returned may be incorrect.

getImagePageTop(img)
Returns the y-coordinate of the given image's top edge relative to the page. Similar to the getPageTop() for layers.
Note that the image reference passed to the function must be a handle returned by the getImage() function. If not, the value returned may be incorrect.

Window and Page Properties


getWindowWidth()
Returns the (inner) width of the window or frame in pixels.

getWindowHeight()
Returns the (inner) height of the window or frame in pixels.

getPageWidth()
Returns the width of the window or frame contents in pixels.

getPageHeight()
Returns the height of the window or frame contents in pixels.

getPageScrollX()
Returns the current horizontal scroll offset of the page with respect to the window or frame.

getPageScrollY()
Returns the current vertical scroll offset of the page with respect to the window or frame.



i'm looking for a smiliar library or a denser one (this one is about 28kb!)
a newer one that runs okay w/ NS6 and opera?

[This message has been edited by lallous (edited 10-25-2001).]

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 10-25-2001 22:22

http://www.scottandrew.com/index.php/site/dhtmllibs


InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-26-2001 14:53

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 10-26-2001 15:19

mr.Max thanks for the link...

Ini, oh well...that Brainjar's api is not really bad for me!
It have/does the basic methods that I need to build any script I want.

I can't build one myself...I hate to dig and see what works on that and what works on another one! i just want my code to interface to a library that handles all this.

Doc, what happened to your snippets? are they for use? documented well? have most of the api I posted in my first post?

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-26-2001 15:35

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

« BackwardsOnwards »

Show Forum Drop Down Menu