By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,569 Members | 1,181 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,569 IT Pros & Developers. It's quick & easy.

select() question

P: n/a
Hi,

I want to maked 2nd box selected when the user leaves the box. But I
cannot enter anything into the first and 3rd boxes. Does the code
cause an infinite loop?

<HTML><HEAD></HEAD>
<BODY><form name="f">
<input type=text name="n1">+
<input type=text name="n2" onBlur="n2.select()" >=
<input type=text name="sum" >
</form></BODY></HTML>

Thanks.

Chris
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
chirs wrote on 01 Dec 2003:
I want to maked 2nd box selected when the user leaves the box.
But I cannot enter anything into the first and 3rd boxes. Does
the code cause an infinite loop?

<HTML><HEAD></HEAD>
<BODY><form name="f">
<input type=text name="n1">+
<input type=text name="n2" onBlur="n2.select()" >=
<input type=text name="sum" >
</form></BODY></HTML>


Yes, because selecting the contents brings focus to the text box. As
you do this unconditionally (that is, /every/ time the user leaves
that text box) the cycle cannot end. What is the point in doing this,
anyway? It makes no sense.

Mike

--
Michael Winter
M.******@blueyonder.co.uk.invalid (remove ".invalid" to reply)
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.