| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

StyleManager

Page history last edited by PBworks 17 years, 11 months ago


 

StyleManager

Object summary

 

This object is used for modifying the CSS attributes of the object on the page as well as changing the CSS classes of them or entirely overloading the active stylesheet.


Constructor

 

This object has no constructor. It is statically accessed.


Methods

 

StyleManager.getStyle(elmID,cssPropertyExtended)

 

parameters

elmID - The String index or object reference to the element.

cssPropertyExtended - Extended CSS notation (border-color for instance).

 

returns

The CSS value of cssPropertyExtended of elmID.

 

comments

Gets the CSS property of a DHTML object.

Note that extended CSS notation (border-color not borderColor for instance) must be given for the method to work cross-browser.


StyleManager.setStyle(elmID,cssProperty,value)

 

parameters

elmID - The String index or object reference to the element.

cssProperty - The property to set.

value - new value.

 

comments

Sets the CSS property of a DHTML object.


StyleManager.setClass(elmID,cssClass)

 

parameters

elmID - The String index or object reference to the element.

cssClass - The new CSS class.

 

comments

Changes the CSS class of the object.


StyleManager.getClass(elmID)

 

parameters

elmID - The String index or object reference to the element.

 

returns

The CSS class of the object.

 

comments

Gets the class name of elmID. elmID can either be the reference to an object on the page, or the String index of the object.


StyleManager.addClass(obj,arClassName)

 

parameters

obj - The String index or object reference to the element.

arClassName - an Array of classNames to be added.

 

comments

Adds the given CSS classes to the object.


StyleManager.removeClass(obj,arClassName)

 

parameters

obj - The String index or object reference to the element.

arClassName - an Array of classNames to be removed.

 

comments

Removes the given CSS classes from the object.


StyleManager.hasClassName(obj,strClassName)

 

parameters

obj - The String index or object reference to the element.

strClassName - The className to check.

 

returns

true if strClassName is defined on obj, false otherwise.

 

comments

Checks wheter a given CSS class exists on an object.


StyleManager.activateAlternateStyleSheet(strTitle)

 

parameters

strTitle - The title of the alternate CSS document to activate.

 

comments

Loads an alternate stylesheet document.


StyleManager.remember(strTitle,intTimeout)

 

parameters

strTitle - The CSS title to remember.

intTimeout - Number of days to remember. If not given defaults to 14.

 

comments

remembers the CSS file for a default period of 2 weeks.


StyleManager.recall()

 

comments

Recalls a CSS that has been stored in client's machine with a cookie.


StyleManager.sanityCheck(obj,cssProperty)

 

parameters

obj - The object id or element reference to check.

cssProperty - The CSS property to check.

 

returns

true if cssProperty can be applied to obj without any error, false otherwise.

 

comments

Checks whether such a CSS property really exists.


See Also

 

LayerObject

DraggableLayer

DynamicLayer


Usage Examples

 

Comments (0)

You don't have permission to comment on this page.