running javascript function on load

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sanjay Goel

    running javascript function on load

    Hi,
    I have a input field like this
    <input name="To" type="text" class="input" value="<%=toLis t%>" size="106"
    onBlur="validat eUser(document. NewCollab.To)">
    this calls validateUser() as soon as I update the input field and lose focus
    from it.

    What I want is that this validateUser() should also be called on the intial
    <%=toList%> that I am filling. I tried adding
    onLoad="validat eUser(document. NewCollab.To)"
    but that didn't work.
    What should I use ?
    TIA
    Sanjay

    P.S. this toList is actually a variable in my jsp and is dynamic. Hence I
    need to call that javascript function


  • Evertjan.

    #2
    Re: running javascript function on load

    Sanjay Goel wrote on 09 jul 2003 in comp.lang.javas cript:
    [color=blue]
    > I have a input field like this
    > <input name="To" type="text" class="input" value="<%=toLis t%>"
    > size="106" onBlur="validat eUser(document. NewCollab.To)">
    > this calls validateUser() as soon as I update the input field and lose
    > focus from it.
    >
    > What I want is that this validateUser() should also be called on the
    > intial <%=toList%> that I am filling. I tried adding
    > onLoad="validat eUser(document. NewCollab.To)"
    > but that didn't work.
    > What should I use ?
    >[/color]

    <body onLoad="validat eUser(document. NewCollab.To)">
    <input name="To" type="text" class="input" value="<%=toLis t%>"
    size="106" onBlur="validat eUser(document. NewCollab.To)">


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    Working...