[Javascript] how to refer to (x)html elements

Tim Burgan lists.latech.edu at greaterthani.com
Tue Nov 11 22:45:37 CST 2003


hello,

as i've been trying to learn javascript - i'm a little stuck.. again

I don't know how to explain this, but instead of:

  document.formName.inputName.value
  (eg. <form name="example"> <input name="example">)

i want to use:

  document.formId.inputId.value
  (eg. <form id="example"> <input id="example" />)

the reason being, that to use the first example I must use
non-standards-compliant xhtml code in my documents.

So is there a way that JavaScript can use xhtml tag's ID elements rather
than the depreciated NAME element?

Thanks
Tim Burgan




More information about the Javascript mailing list