running javascript function on load

S

Sanjay Goel

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
 
E

Evertjan.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top