The Kelly Company and Shamrock Logo
DAWKCo(tm) Software: e-Mail POP3 Server, SMTP Anti-Spam eMail Blocker, WebMail, Web Site Mapper, Website Design
 
Software Websites News Favorites Contact



Advanced Search

Sitemap






 
Message Board Posting: Software Topic

The content of these postings are the words of the persons posting the messages and do not necessarily reflect the views or opinions of the owners or operators of this web site.

[Software Topic Messages] [Message Board Terms Of Use]

Subject: Finally some 'Standards'
Posted by: Anonymous
Date: Wed, 21 Aug 2002 20:20:02 -0400
Message:

I like this sites use of the ECMA Script Binding for DOM (Document Object Model).   Now that most current browsers are supporting DOM, we finally have a way to script web pages that will work in most browsers without a multitude of browser specific hacks.

For example, the way this site's script tests for browser capabilities based on functions supported instead of by browser brand or version:

function ShowGroupMenu(oMenuElt) {
   if (oMenuElt && document.getElementById) {
      var sGrpID = "" + oMenuElt.id.substring(0, oMenuElt.id.indexOf("_"));
      var sGroupMenuItemID = sGrpID + "_menuitem";
      var oGroupMenuItem = document.getElementById(sGroupMenuItemID);
// ...
// etc.
   }
}

At that point, if the browser supports the DOM's document.getElementById() script binding function, you have an object reference to an (HTML) Element in the web page (identified by its id="" attribute); and, you can dynamically access and/or change all of that element's styles and attributes using the other DOM script binding functions available. An example being the collapsible pop-up menus used here.

If the browser doesn't support DOM, the scripting function is skipped and the web page merely displays a static link from an A (anchor) element tag that's embedded within the menu's DIV element.

I'm not saying that all browsers will now be 100% compatible, but these methods will definitely save some hair-pulling over those issues, and in the long-run make life a lot easier for the web designer/programmer.

Thank you W3C!


Post A Follow-up To This Message


Follow-ups:
    none

[Software Topic Messages] [Message Board Terms Of Use]


Shamrock LogoHome | Software | Websites | News | Links | Contact | Sitemap | ^
Web Pages by DAWKCoTM Software
Copyright ©1996-2015 The Kelly CompanySM. All rights reserved.

Page Last Updated:  Thursday, 09-Mar-2017 19:40:00 EST