Dynamic HTML ▪ Sale

Dynamic HTML, or DHTML, is an umbrella term for a collection of technologies used together to create interactive and animated web sites by using a combination of a static markup language (such as HTML), a client-side scripting language (such as JavaScript), a presentation definition language (such as CSS), and the Document Object Model.

DHTML allows scripting languages to change variables in a web page's definition language, which in turn affects the look and function of otherwise "static" HTML page content, after the page has been fully loaded and during the viewing process. Thus the dynamic characteristic of DHTML is the way it functions while a page is viewed, not in its ability to generate a unique page with each page load.

By contrast, a dynamic web page is a broader concept, covering any web page generated differently for each user, load occurrence, or specific variable values. This includes pages created by client-side scripting, and ones created by server-side scripting (such as PHP, Perl, JSP or ASP.NET) where the web server generates content before sending it to the client.

DHTML is differentiated from AJAX by the fact that a DHTML page is still request/reload-based. With DHTML, there may not be any interaction between the client and server after the page is loaded; all processing happens in Javascript on the client side. By contrast, an AJAX page uses features of DHTML to initiate a request (or 'subrequest') to the server to perform actions such as loading more content.

Uses [edit]

DHTML allows authors to add effects to their pages that are otherwise difficult to achieve. In short words: scripting language is changing the DOM and style. For example, DHTML allows the page author to:

A less common use is to create browser-based action games. Although a number of games were created using DHTML during the late 1990s and early 2000s,, differences between browsers made this difficult: many techniques had to be implemented in code to enable the games to work on multiple platforms. Recently browsers have been converging towards the web standards, which has made the design of DHTML games more viable. Those games can be played on all major browsers and they can also be ported to Plasma for KDE, Widgets for Mac OS X and Gadgets for Windows Vista, which are based on DHTML code.

The term "DHTML" has fallen out of use in recent years as it was associated with practices and conventions that tended to not work well between various web browsers. DHTML may now be referred to as unobtrusive JavaScript coding (DOM Scripting), in an effort to place an emphasis on agreed-upon best practices while allowing similar effects in an accessible, standards-compliant way.

DHTML support with extensive DOM access was introduced with Internet Explorer 4.0. although there was a basic dynamic system with Netscape Navigator 4.0, not all HTML elements were represented in the DOM. When DHTML-style techniques became widespread, varying degrees of support among web browsers for the technologies involved made them difficult to develop and debug. Development became easier when Internet Explorer 5.0+, Mozilla Firefox 2.0+, and Opera 7.0+ adopted a shared DOM inherited from ECMAscript.

More recently, JavaScript libraries such as jQuery have abstracted away much of the day-to-day difficulties in cross-browser DOM manipulation.

Structure of a web page [edit]

Typically a web page using DHTML is set up in the following way:

<!doctype html>
<html lang="en">
     <head>
          <meta charset="utf-8">
          <title>DHTML example</title>
     </head>
     <body>
          <div id="navigation"></div>
 
          <script> 
               var init = function () {
                    myObj = document.getElementById("navigation");
                    // ... manipulate myObj
               };
               window.onload = init;
          </script>
 
          <!--
          Often the code is stored in an external file; this is done 
          by linking the file that contains the JavaScript. 
          This is helpful when several pages use the same script:
          -->
          <script src="myjavascript.js"></script>
     </body>
</html>

Example: Displaying an additional block of text [edit]

The following code illustrates an often-used function. An additional part of a web page will only be displayed if the user requests it..

<!doctype html>
<html lang="en">
     <head>
          <meta charset="utf-8">
          <title>Using a DOM function</title>
          <style>
               a {background-color:#eee;}
               a:hover {background:#ff0;}
               #toggleMe {background:#cfc; display:none; margin:30px 0; padding:1em;}
          </style>
     </head>
     <body>
          <h1>Using a DOM function</h1>
 
          <h2><a id="showhide" href="#">Show paragraph</a></h2>
 
          <p id="toggleMe">This is the paragraph that is only displayed on request.</p>
 
          <p>The general flow of the document continues.</p>
 
          <script>
               changeDisplayState = function (id) {
                    var d = document.getElementById('showhide'),
                         e = document.getElementById(id);
                    if (e.style.display === 'none' || e.style.display === '') {
                         e.style.display = 'block';
                         d.innerHTML = 'Hide paragraph';
                    }
                    else {
                         e.style.display = 'none';
                         d.innerHTML = 'Show paragraph';
                    }
               };
               document.getElementById('showhide').onclick = function () {
                    changeDisplayState('toggleMe');
                    return false;
               };
          </script>
     </body>
</html>

Document Object Model [edit]

DHTML is not a technology in and of itself; rather, it is the product of three related and complementary technologies: HTML, Cascading Style Sheets (CSS), and JavaScript. To allow scripts and components to access features of HTML and CSS, the contents of the document are represented as objects in a programming model known as the Document Object Model (DOM).

The DOM API is the foundation of DHTML, providing a structured interface that allows access and manipulation of virtually anything in the document. The HTML elements in the document are available as a hierarchical tree of individual objects, meaning you can examine and modify an element and its attributes by reading and setting properties and by calling methods. The text between elements is also available through DOM properties and methods.

The DOM also provides access to user actions such as pressing a key and clicking the mouse. You can intercept and process these and other events by creating event handler functions and routines. The event handler receives control each time a given event occurs and can carry out any appropriate action, including using the DOM to change the document.

Dynamic styles [edit]

Dynamic styles are a key feature of DHTML. By using CSS, you can quickly change the appearance and formatting of elements in a document without adding or removing elements. This helps keep your documents small and the scripts that manipulate the document fast.

The object model provides programmatic access to styles. This means you can change inline styles on individual elements and change style rules using simple script-based programming. These scripts can be written in any language supported by the target browser, such as JavaScript, Microsoft JScript, or Microsoft Visual Basic Scripting Edition (VBScript), but in practice JavaScript is the only scripting language supported by all popular end-user browsers.

Inline styles are CSS style assignments that have been applied to an element using the style attribute. You can examine and set these styles by retrieving the style object for an individual element. For example, to highlight the text in a heading when the user moves the mouse pointer over it, you can use the style object to enlarge the font and change its color, as shown in the following simple example.

<!doctype html>
<html lang="en">
<head>
        <meta charset="utf-8">
        <title>Dynamic Styles</title>
        <style>
                ul {display:none;}
        </style>
</head>
 
<body>
 
        <h1>Welcome to Dynamic HTML</h1>
 
        <p><a href="#">Dynamic styles are a key feature of DHTML.</a></p>
 
        <ul>
                <li>Change the color, size, and typeface of text</li>
                <li>Show and hide text</li>
                <li>And much, much more</li>
        </ul>
 
        <p>We've only just begun!</p>
 
        <script>
                showMe = function () {
                        document.getElementsByTagName("h1")[0].style.color = "#990000";
                        document.getElementsByTagName("ul")[0].style.display = "block";
                };
 
                document.getElementsByTagName("a")[0].onclick = function (e) {
                        e.preventDefault();
                        showMe();
                };
        </script>
 
</body>
</html>

Data binding [edit]

Data binding is a DHTML feature that lets you easily bind individual elements in your document to data from another source, such as a database or comma-delimited text file. When the document is loaded, the data is automatically retrieved from the source and formatted and displayed within the element.

One practical way to use data binding is to automatically and dynamically generate tables in your document. You can do this by binding a table element to a data source. When the document is viewed, a new row is created in the table for each record retrieved from the source, and the cells of each row are filled with text and data from the fields of the record. Because this generation is dynamic, the user can view the page while new rows are created in the table. Additionally, once all the table data is present, you can manipulate (sort or filter) the data without requiring the server to send additional data. The table is regenerated, using the previously retrieved data to fill the new rows and cells of the table.

Another practical use of data binding is to bind one or more elements in the document to specific fields of a given record. When the page is viewed, the elements are filled with text and data from the fields in that record, sometimes called the "current" record. An example is a form letter in which the name, e-mail address, and other details about an individual are filled from a database. To adapt the letter for a given individual, you specify which record should be the current record. No other changes to the letter are needed.

Yet another practical use is to bind the fields in a form to fields in a record. Not only can the user view the content of the record, but the user can also change that content by changing the settings and values of the form. The user can then submit these changes so that the new data is uploaded to the source-for example, to the HTTP server or database.

To provide data binding in your documents, you must add a data source object (DSO) to your document. This invisible object is an ActiveX control or Java applet that knows how to communicate with the data source. The following example shows how easy it is to bind a table to a DSO. When viewed, this example displays the first three fields from all the comma-delimited records of the file "sampdata.csv" in a clear, easy-to-read table.

<!doctype html>
<html lang="en">
<head>
        <meta charset="utf-8">
        <title>Data Binding Example</title>
        <style>
                td, th {border:1px solid;}
        </style>
</head>
 
<body>
        <h1>Data Binding Example</h1>
 
        <object classid="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83" id="sampdata">
                <param name="DataURL" value="sampdata.csv">
                <param name="UseHeader" value="True">
        </object>
 
        <table datasrc="#sampdata">
                <thead>
                        <tr>
                                <th>A</th>
                                <th>B</th>
                                <th>C</th>
                        </tr>
                </thead>
 
                <!-- fields will not display without the accompanying CSV file -->
                <tbody>
                        <tr>
                                <td><span datafld="a"></span></td>
                                <td><span datafld="b"></span></td>
                                <td><span datafld="c"></span></td>
                        </tr>
                </tbody>
        </table>
</body>
</html>

References [edit]

  1. http://www.w3.org/DOM/#why
  2. http://www.w3.org/Style/#dynamic

External links [edit]

Popular search requests

Dynamic HTML is an object of interest for many people. For example, the people often search for Dynamic HTML website, Dynamic HTML blog, Dynamic HTML online, Dynamic HTML information, Dynamic HTML photo, Dynamic HTML picture, Dynamic HTML video, Dynamic HTML movie, Dynamic HTML history, Dynamic HTML news, Dynamic HTML facts, Dynamic HTML description, Dynamic HTML detailed info, Dynamic HTML features, Dynamic HTML manual, Dynamic HTML instructions, Dynamic HTML comparison, Dynamic HTML book, Dynamic HTML story, Dynamic HTML article, Dynamic HTML review, Dynamic HTML feedbacks, Dynamic HTML selection, Dynamic HTML data, Dynamic HTML address, Dynamic HTML phone number, download Dynamic HTML, Dynamic HTML reference, Dynamic HTML wikipedia, Dynamic HTML facebook, Dynamic HTML twitter, Dynamic HTML 2013, Dynamic HTML 2014, Dynamic HTML in the United States, Dynamic HTML USA, Dynamic HTML US, Dynamic HTML in United Kingdom, Dynamic HTML UK, Dynamic HTML in Canada, Dynamic HTML in Australia, etc.

Dynamic HTML is also an object of commercial interest. For example, many people are interested in Dynamic HTML offers, Dynamic HTML buy, Dynamic HTML sell, Dynamic HTML sale, Dynamic HTML discounts, discounted Dynamic HTML, Dynamic HTML coupon, Dynamic HTML promo code, Dynamic HTML order, to order Dynamic HTML online, to buy Dynamic HTML, how much for Dynamic HTML, Dynamic HTML price, Dynamic HTML cost, Dynamic HTML price list, Dynamic HTML tariffs, Dynamic HTML rates, Dynamic HTML prices, Dynamic HTML delivery, Dynamic HTML store, Dynamic HTML online store, Dynamic HTML online shop, inexpensive Dynamic HTML, cheap Dynamic HTML, Dynamic HTML for free, free Dynamic HTML, used Dynamic HTML, and so on.

Information source: wikipedia.org

Do you want to know more? Look at the full version of the Dynamic HTML article.

HOT DESIGNS
Premium designs
Designs by country
Designs by U.S. state
Most popular designs
Newest, last added designs
Unique designs
Cheap, budget designs
Design super sale

DESIGNS BY THEME
Accounting, audit designs
Adult, sex designs
African designs
American, U.S. designs
Animals, birds, pets designs
Agricultural, farming designs
Architecture, building designs
Army, navy, military designs
Audio & video designs
Automobiles, car designs
Books, e-book designs
Beauty salon, SPA designs
Black, dark designs
Business, corporate designs
Charity, donation designs
Cinema, movie, film designs
Computer, hardware designs
Celebrity, star fan designs
Children, family designs
Christmas, New Year's designs
Green, St. Patrick designs
Dating, matchmaking designs
Design studio, creative designs
Educational, student designs
Electronics designs
Entertainment, fun designs
Fashion, wear designs
Finance, financial designs
Fishing & hunting designs
Flowers, floral shop designs
Food, nutrition designs
Football, soccer designs
Gambling, casino designs
Games, gaming designs
Gifts, gift designs
Halloween, carnival designs
Hotel, resort designs
Industry, industrial designs
Insurance, insurer designs
Interior, furniture designs
International designs
Internet technology designs
Jewelry, jewellery designs
Job & employment designs
Landscaping, garden designs
Law, juridical, legal designs
Love, romantic designs
Marketing designs
Media, radio, TV designs
Medicine, health care designs
Mortgage, loan designs
Music, musical designs
Night club, dancing designs
Photography, photo designs
Personal, individual designs
Politics, political designs
Real estate, realty designs
Religious, church designs
Restaurant, cafe designs
Retirement, pension designs
Science, scientific designs
Sea, ocean, river designs
Security, protection designs
Social, cultural designs
Spirit, meditational designs
Software designs
Sports, sporting designs
Telecommunication designs
Travel, vacation designs
Transport, logistic designs
Web hosting designs
Wedding, marriage designs
White, light designs

E-COMMERCE DESIGNS
Magento store designs
OpenCart store designs
PrestaShop store designs
CRE Loaded store designs
Jigoshop store designs
VirtueMart store designs
osCommerce store designs
Zen Cart store designs

CMS DESIGNS
Flash CMS designs
Joomla CMS designs
Mambo CMS designs
Drupal CMS designs
WordPress blog designs
Forum designs
phpBB forum designs
PHP-Nuke portal designs

ANIMATED WEBSITE DESIGNS
Flash CMS designs
Silverlight animated designs
Silverlight intro designs
Flash animated designs
Flash intro designs
XML Flash designs
Flash 8 animated designs
Dynamic Flash designs
Flash animated photo albums
Dynamic Swish designs
Swish animated designs
jQuery animated designs

WEBSITE DESIGNS
WebMatrix Razor designs
HTML 5 designs
Web 2.0 designs
3-color variation designs
3D, three-dimensional designs
Artwork, illustrated designs
Clean, simple designs
CSS based website designs
Full design packages
Full ready websites
Portal designs
Stretched, full screen designs
Universal, neutral designs

CORPORATE ID DESIGNS
Corporate identity sets
Logo layouts, logo designs
Logotype sets, logo packs
PowerPoint, PTT designs
Facebook themes

VIDEO, SOUND & MUSIC
Video e-cards
After Effects video intros
Special video effects
Music tracks, music loops
Stock music bank

GRAPHICS & CLIPART
Pro clipart & illustrations, $19/year
5,000+ icons by subscription
Icons, pictograms

 
Dynamic HTML Sale - Buy now!
Super Offers
Super Offers
Custom Logo Design $149  ▪  Web Programming  ▪  ID Card Printing  ▪  Best Web Hosting  ▪  eCommerce Software  ▪  Add Your Link
© 1996-2013 MAGIA Internet StudioAboutPortfolioPhoto on DemandHostingAdvertiseSitemapPrivacyMaria Online