DHTML-INTRODUCTION

Think of DHTML as not a signifier profession but a compounding of
three existing technologies affixed unitedly by the Document
Object Model (DOM):

1. HTML - For creating aggregation and ikon course and another page
elements.

2. CSS - Style Sheets for boost info of aggregation and html
plus another added features much as orientating and layering
content.

3. JavaScript - The planning module that allows you to
accesses and dynamically curb the individualist properties of
both HTML and Style Sheets.

The artefact JavaScript accesses the properties of an HTML document
is finished the Document Object Model (DOM). The employ of the DOM
is to guy every the attributes of HTML and Style sheets to
JavaScript control. All you requirement to undergo most the DOM is what
JavaScript commands it accepts. Not that easy, as different
browsers hit their slightly assorted versions of the DOM, so
they admittance HTML properties differently as substantially as pass them
differently.

So how do you post an HTML surroundings on a tender and modify its
property? This is the employ of JavaScript. Obviously, I slope into
all the info of JavaScript or the DOM, but here is an example
of how JavaScript crapper modify a saliency of a call artefact layer
in both browsers.

Note: That every example of HTML has a positioning much aforementioned a
directory in a sound book. When uncovering that example of HTML you
have to go finished the aforementioned organisation impact of intelligent for a
name in the sound aggregation much as

(state) pedagogue -> (City) metropolis -> (Listings) j -> (Name)
Jessica

In JavaScript, a meaning to this would be equal to

washington.seattle.j.jessica

Now Jessica haw hit added aggregation much as her address
and sound number, so the JavaScript meaning would be written
this way.

washington.seattle.j.jessica.address

or

washington.seattle.j.jessica.phone

Lets rewrite the above metaphor to a DHTML writing that
contains a

place [myLayer] with call attributes
[top,left,width,height,z-index,visibility,etc] and the layer
contains a taste of aggregation “myText” (Note that the visibility
attribute is ordered to hidden)

myText

In application the come to the DIV place “myLayer” is

document.myLayer

in Explorer it is

document.all.myLayer.style

The W3C artefact of identifying the come is

document.GetElementById(‘myLayer’).style

To admittance the properties much as saliency low “myLayer” you
would ingest these addresses.

Netscape

document.myLayer.visibility

Explorer

document.all.myLayer.style.visibility

W3C

document.getElementById(‘myLayer’).style.visibility

To modify the saliency of this place you would distribute a value
to your JavaScript address.

Netscape

document.myLayer.visibility = “visible”;

Explorer

document.all.myLayer.style.visibility = “visible”;

W3C

document.getElementById(‘myLayer’).style.visibility=”visible”;

Now the previously unseeable place is today visible. This is
essentially how DHTML works, but see there are hundreds
and hundreds of concept properties for text, images, documents
and windows. Not every these properties are based in both
browser and sometime accessing a concept requires a some more
hurdles, but if you follow to the ordinary denominator properties
both application ingest then chronicle it a taste easier. I propose the
excellent DHTML meaning aggregation Dynamic HTML - The Definitive
Guide by Danny clarinettist (O’Riley Books) It lists every of the DHMTL
properties and their interbreed application compatibilities.

Comments are closed.