[Javascript] Object Access

Michael Dougherty Michael_Dougherty at PBP.com
Wed Apr 23 14:09:46 CDT 2003


oRef = document.getElementById("ElementID")

is the the "approved" syntax for getting an object reference?
Is it worthwhile to write/use wrapper functions like this:

function getObjRef( tcObjectID ) {
  return document.getElementById( tcObjectID )
}

oRef = getObjRef("ElementID")
alert(oRef.value)

Why??


More information about the Javascript mailing list