DHTML DOM References
- GECKO DOM REFERENCE - http://developer.mozilla.org/en/docs/Gecko_DOM_Reference
- AJAX: http://www.ajaxpatterns.org/
- COLORBLENDER http://colorblender.com/ (Example Uses DHTML Extensively)
- W3C Document Object Model Level 1
- W3C Document Object Model Level 2
- W3C Document Object Model Level 3
- Microsoft DHTML DOM Reference
Setting Focus.
The following function is a lifesaver.It's an automatic usability enhancement for forms.
It insures that focus is set on the first valid control.
Just call it from the onload event.
function focusFirstControl( formID )
{
var frm = document.forms[formID];
if( frm )
{
// iterate throuugh form controls, find the first usable one to focus.
for(i in frm.elements)
{
if( frm.elements[i] && frm.elements[i].tagName )
{
var tagName = frm.elements[i].tagName;
if( tagName == "SELECT" || tagName == "INPUT" && frm.elements[i].type == "text" || tagName == "TEXTAREA" )
{
if( tagName == "INPUT" && frm.elements[i].readOnly )// check readonly property
continue;
if( frm.elements[i].disabled ) // is it disabled
continue;
if( frm.elements[i].offsetWidth == 0 ) // best visibility indicator I could find
continue;
frm.elements[i].focus();
break;
}
}
}
}
}
http://www.mozilla.org/docs/dom/domref/dom_shortTOC.html
