John,
john lee wrote:
plain html file
<input type='text' name='part'>
i can use javascript to access "input" tag by
document.getElementsByTagName("INPUT");
but for struts html file
<html:text property="part">
i can not use javascript to access "input" tag by
either
document.getElementsByTagName("INPUT");
or
document.getElementsByTagName("HTML:TEXT");
Could there be a DOCTYPE issue here? My understanding is that
document.getElementsByTagName is supposed to accept a case-insensitive
string, but it's possible that my using a DOCTYPE of xhtml that you must
use lower case. Have you tried lower case?
If that doesn't work, try doing document.getElementsByTagName('*') and
iterating through them. Inspect the name of each element and see if
maybe there's another problem.
My last piece of advice would be to use document.getElementById whenever
possible in preference to document.getElementsByTagName.
- -chris
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org