DHTML-Introduction

     

Cheap Self Employed Loan - Low Interest Loans for Small Business
Category:
 

OKI Toner Cartridges Providing Impressive Printing Quality
Category:
 

How To Get Stop Smoking Support
Category:
 

Marrying A Russian Mail Order Bride Through Russian Dating Servi...
Category:
 

Why Use FR Bedding and Waterproof Bedding
Category:
 

txtNation powers a picture campaign of one of the world's greate...
Category:
 

College Loan, How To Get A Better Education
Category:
 

Wedding Day- Most Important Days Of One's Life
Category:
 

Instant Payday Loans With Instant Solutions
Category:
 

Labeled articles for your Adsense Site
Category:
 

Hotel Ala Moana | Ala Moana Hotel | Ala Moana
Category:
 

International Pressure Mounts on China to Accelerate Appreciatio...
Category:
 

New Mozambique President Sworn In
Category:
 

The advantages of consumer credit counseling
Category:
Business  

Rice Meets with Israeli, Palestinian Leaders
Category:
 

The Myth of the Work Life Balance
Category:
 

Seeking Clarity in Uncertain Times
Category:
 

Bad Credit Home Loans- Your Home can Improve Your Credit
Category:
 

Northern Iraq Tightens Security Before Elections, Takes No Chanc...
Category:
 

Easy Ezine Promotion
Category:
 

EU Calls on China to Open Markets
Category:
 

How To Get Rid Of Flabby Arms And A Belly At Home
Category:
 

The Best Internet Marketing Product To Sell
Category:
 

Chews for Health
Category:
 

Indonesia Reports Human Bird Flu Infection
Category:
 

Facts and Myths of Working From Home
Category:
 

A Look at Medical Billing Services
Category:
 

Three tips for Internet Product Marketing Success
Category:
 

Nokia 6500 Classic: High-on features and looks
Category:
 

Ted Baker: No Ordinary Fashion Designer
Category:
 

Bush Seeks Approval of $1.2 Billion To Fight Bird Flu and Help P...
Category:
 

Are You Predicting or Prescribing Your Future? It's Your Choice!
Category:
 

UN Diplomats, Experts Prioritize Global Challenges
Category:
 

Get Serious
Category:
 

US Lawmakers Uneasy About North Korean Intentions in Six-Party T...
Category:
 

Entrepreneurship: What does it really Mean?
Category:
business  

How To Lose That Holiday Weight Gain
Category:
 

Basic, Better and Brilliant Ways to Sell a Product Online
Category:
 

North Korea Says it Wants Reactor Before Dismantling Nuclear Wea...
Category:
 

Make sales by creating perfect outline for your articles
Category:
 

Setting Up Your Job Search Control Room
Category:
 

How To Set Yourself Apart From Other Affiliate Marketers
Category:
 

Can you have instant Success with a Home Based Business
Category:
 

Improve Your Web Copy
Category:
 

Advergaming ? Playing to Win
Category:
 

How To Choose Your Web Host
Category:
 

How Can You Use Niche Affiliate Marketing To Make Money
Category:
 

Technology in the Workplace: The Benefits of Video Conferencing
Category:
 

Afghans Seize 15 Tons of Drugs in Operations
Category:
 

Chinese Coal Mine Flood Kills 22
Category:
 

Cubans Cast Ballots in Municipal Elections
Category:
 

7 Tips For Getting The Best Deal On Credit Cards
Category:
 

French Lawmakers Boycott Meeting With Libya's Gadhafi
Category:
 

S.Korea Promises Aid to North If Cross-Border Rail Test Goes Ahe...
Category:
 

30 Minutes Free Report Reveals The Arts Of Link Exchange!
Category:
 

Repeat after me: "I have only one business."
Category:
 

Myth Of The Aging Brain
Category:
 

Pakistani Police Arrest Protesters; US Blasts Military Rule
Category:
 

Is Your Fish Oil Giving You Mercury Poisoning?
Category:
 

7 Cost Cutting Tips
Category:
 

Give Your Visitors a Free Email Course
Category:
 

How To Get An Adverse Credit Loan In A Hurry
Category:
 

Ousted 'Idol' Sanjaya Weighing His Options
Category:
 

How To Build A Massive List & Win Subscribers!
Category:
 

5 TOP TIPS ON SELECTING WEB TRAFFIC SERVICES
Category:
 

Affiliate Revenue Secrets - Affiliate Marketing Millionaire lays...
Category:
 

US Senate Republican Opposition to Bush Strategy in Iraq Continu...
Category:
 

NO FREE LUNCH!
Category:
 

Tennis: Federer Upset in Australian Open Tune-up
Category:
 

Caregiver Survival Tips - Three Ways to Stay Positive
Category:
 

Report: US Proposing European Shield for Iran Missiles
Category:
 

Expanding your view of what's possible with your Internet busine...
Category:
 

Winter Driving
Category:
Business  

Australian Inquiry Probes Possible Bribes to Saddam Hussein Gove...
Category:
 

New Car Leasing - What To Ask?
Category:

       

DHTML Introduction 0 article

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.

By Eddie Traversa
Category: 0

Submit your Recipes Here!


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)



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.

About the Author

Eddie Traversa
DHTML Nirvana http://nirvana.media3.net/ is a site
dedicated to exploring the possibilites of DHTML. It hosts free graphics,
dhtml templates and tutorials. Some of the tutorials emphasis is on
Flash/DHTML integration.