ArticlesReader.com Menu
Newest Articles
Most Viewed Articles
ArticlesReader.com RSS
Submit Article
Login
Signup
Search the articles

Articles Main Categories
Advice
Animals
Automobiles
Business
Career
Communications
Computer Programming
Computers
Entertainment
Environment
Family
Fashion
Finance
Food
Health & Medical
Home & Garden
Humor
Internet Business
Internet Marketing
Legal
Leisure & Recreation
Marketing
Other
Politics
Reference & Education
Religion
Self Improvement
Sports
Technology & Science
Travel
Writing
Subscribe
Receive alert message from us when new articles submitted to our site for free.

Enter your name

Enter your email

Syndicate

















Related Products
Home::Eddie Traversa

DHTML-Introduction

Author : Eddie Traversa

Think of DHTML as not a singular technology but a combination of
three existing technologies glued together by the Document
Object Model (DOM):

1. HTML - For creating text and image links and other page
elements.

2. CSS - Style Sheets for further formatting of text and html
plus other added features such as positioning and layering
content.

3. JavaScript - The programming language that allows you to
accesses and dynamically control the individual properties of
both HTML and Style Sheets.

The way JavaScript accesses the properties of an HTML document
is through the Document Object Model (DOM). The job of the DOM
is to expose all the attributes of HTML and Style sheets to
JavaScript control. All you need to know about the DOM is what
JavaScript commands it accepts. Not that easy, as different
browsers have their slightly different versions of the DOM, so
they access HTML properties differently as well as display them
differently.

So how do you locate an HTML element on a page and change its
property? This is the job of JavaScript. Obviously, I cant into
all the details of JavaScript or the DOM, but here is an example
of how JavaScript can change a visibility of a style sheet layer
in both browsers.

Note: That every piece of HTML has a location much like a
directory in a phone book. When finding that piece of HTML you
have to go through the same hierarchy process of searching for a
name in the phone book such as

(state) Washington -> (City) Seattle -> (Listings) j -> (Name)
Jessica

In JavaScript, a reference to this would be equivalent to

washington.seattle.j.jessica

Now Jessica may have additional information such as her address
and phone number, so the JavaScript reference would be written
this way.

washington.seattle.j.jessica.address

or

washington.seattle.j.jessica.phone

Lets transcribe the above metaphor to a DHTML document that
contains a
layer [myLayer] with style attributes
[top,left,width,height,z-index,visibility,etc] and the layer
contains a bit of text "myText" (Note that the visibility
attribute is set to hidden)

myText


In Netscape the address to the DIV layer "myLayer" is

document.myLayer

in Explorer it is

document.all.myLayer.style

The W3C way of identifying the address is

document.GetElementById(‘myLayer’).style

To access the properties such as visibility under "myLayer" you
would use these addresses.

Netscape

document.myLayer.visibility

Explorer

document.all.myLayer.style.visibility

W3C

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

To change the visibility of this layer you would assign 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 hidden layer is now visible. This is
essentially how DHTML works, but understand there are hundreds
and hundreds of attribute properties for text, images, documents
and windows. Not all these properties are supported in both
browser and sometime accessing a property requires a few more
hurdles, but if you stick to the common denominator properties
both browser use then life it a bit easier. I recommend the
excellent DHTML reference book Dynamic HTML - The Definitive
Guide by Danny Goodman (O'Riley Books) It lists all of the DHMTL
properties and their cross browser compatibilities.

Spam emails More free articles

Related articles


  1. DHTML-Introduction
  2. Where is the Best PR Value?
  3. DHTML or Flash?
  4. HTML Encryption Blowfish Encryption Script Encryption
More related feeds
dhtml-introduction
think of dhtml as not a singular technology but a combination of three existing technologies glued together by the document object model (dom):. 1. html - for creating text and image links and other page elements. ...

DHTML Introduction
Hi my name is Jon Howe. This is the first online class that I have ever taken. I really enjoy building websites and hope to learn many interesting techniques through this class. I have lived here in Idaho about a year and half. ...

web design level 5: dhtml (introduction) dit 15522 0802
dhtml (introduction) description this course introduces the student to javascript, the primary client-side scripting tool used on the web. robust in nature and easy on syntax, scripting languages like this allow you to add versatility ...

dhtml introduction tutorial
dhtml is the art of combining html, javascript, dom, and css. what you should already know. before you continue you should have a basic understanding of the following:. html; javascript; css. dhtml is not a language ...

dhtml-introduction
think of dhtml as not a singular technology but a combination of three existing technologies glued together by the document object model (dom): 1. html - for creating text and im... source: http://www.goarticles.com/cgi-bin/showa.cgi? ...

dhtml introduction to scripting the dom
web lore has it that the dom an off-putting, complicated and esoteric subject. however, the heart of the dom is pretty straightforward. simply put, the dom allows you to dynamically change the page... [[ this is a content summary only. ...

dhtml-introduction
in some part of the world internet is a big problem. i was searching internet for and in news i read that in china there is a hospital especially for internet addicts. maybe someday a hospital will be required for adsense addicts.

course: web design level 5: dhtml (introduction) 15522 0701
the focus will be on learning core-programming and skills using javascript. dates. february 05 - february 26, 2008 (7 classes: tue/thu). continue reading "course: web design level 5: dhtml (introduction) 15522 0701"

dhtml introduction...
not all these properties are supported in both browser and sometime accessing a property requires a few more hurdles, but if you stick to the common denominator properties both browser use then life it a bit easier. ...

dhtml introduction...
this is the job of javascript. obviously, i cant into all the details of javascript or the dom, but here is an example of how javascript can change a visibility of a style sheet layer in both browsers. note: that every piece of html has ...

 


 

© 2007 articlesreader.com - All Rights Reserved