[Javascript] onBlur & onFocus together

Paul McGuire pmcguire at cguk.co.uk
Fri Feb 18 06:49:01 CST 2005


Should that not be onFocus = "this.select()"> not onFocus"this.select()">??


I would guess from that using onFocus"this.select()"> triggers the onblur
and creates the loop.

Paul

-----Original Message-----
From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]
On Behalf Of Iztok Polanic
Sent: 18 February 2005 12:27
To: [JavaScript List]
Subject: Re: [Javascript] onBlur & onFocus together

Hi!

There's nothing to see :)

Line below is triggered when the comparison fails:

document.forms['form'].elements['user'].focus();

and this is <input>for this element:

<input type="text" name="user" onBlur="something()" onFocus"this.select()">


Bye,

Iztok

Hakan M (Backbase) wrote:
> It's because of the position of the moon in relation to jupiter.
> 
> Seriously, we need to see some code to solve your problem.
> 
> Regards,
> H
> 
> Iztok Polanic wrote:
> 
>> Hi!
>>
>> I'm building a web form. I'm using a onBlur event to check if the 
>> string is correct. Otherwise it should go back to that field (via 
>> onFocus). Strange thing is, that I'm trapped in a loop. Why is this 
>> happening and how to solve this?
>>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list