FAQ
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");

Can anyone give me ur hand?

tks in advance

john



---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.

Search Discussions

  • Dave Newton at Apr 16, 2007 at 9:24 pm

    --- 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");
    Why not? Do you get an error? <html:text.../> just
    generates an <input type='text'.../> tag.

    d.


    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
    For additional commands, e-mail: user-help@struts.apache.org
  • John lee at Apr 16, 2007 at 9:34 pm
    dave,

    tks ur reply.

    when i test plain html file with input tag
    document.getElementsByTagName("INPUT").length>0

    when i test struts html file with html:text tag

    document.getElementsByTagName("INPUT").length=0

    any clue?

    tks

    john


    Dave Newton wrote:
    --- john lee wrote:
    plain html file
    [input]
    i can use javascript to access "input" tag by
    document.getElementsByTagName("INPUT");

    but for struts html file

    i can not use javascript to access "input" tag
    by either document.getElementsByTagName("INPUT");
    Why not? Do you get an error? just
    generates an [input] tag.

    d.


    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
    For additional commands, e-mail: user-help@struts.apache.org




    ---------------------------------
    Ahhh...imagining that irresistible "new car" smell?
    Check outnew cars at Yahoo! Autos.
  • Christopher Schultz at Apr 16, 2007 at 9:55 pm
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesstruts
postedApr 16, '07 at 9:11p
activeApr 16, '07 at 9:55p
posts4
users3
websitestruts.apache.org
irc#struts

People

Translate

site design / logo © 2022 Grokbase