471,573 Members | 1,020 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,573 software developers and data experts.

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 4551
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
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.