469,280 Members | 1,816 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,280 developers. It's quick & easy.

running javascript function on load

Hi,
I have a input field like this
<input name="To" type="text" class="input" value="<%=toList%>" size="106"
onBlur="validateUser(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="validateUser(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
Jul 20 '05 #1
1 4524
Sanjay Goel wrote on 09 jul 2003 in comp.lang.javascript:
I have a input field like this
<input name="To" type="text" class="input" value="<%=toList%>"
size="106" onBlur="validateUser(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="validateUser(document.NewCollab.To)"
but that didn't work.
What should I use ?


<body onLoad="validateUser(document.NewCollab.To)">
<input name="To" type="text" class="input" value="<%=toList%>"
size="106" onBlur="validateUser(document.NewCollab.To)">
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by annoyingmouse2002 | last post: by
12 posts views Thread by GreenBayFan | last post: by
6 posts views Thread by acord | last post: by
1 post views Thread by daniel_xi | last post: by
22 posts views Thread by Christopher Nelson | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.