[Javascript] onBlur & onFocus together

Allard Schripsema allard-schripsema at procergs.rs.gov.br
Fri Feb 18 06:43:49 CST 2005


TESTED IT AND WORKED,
We need to see the rest of SOMETHING(), i guess.

<html>
<head>
<title>Untitled</title>
</head>
<script>
function something(){
if (document.forms['form'].elements['user'].value!="1")
	document.forms['form'].elements['user'].focus();
}
</script>
<body>
<form name="form">
<input type="text" name="user" onBlur="something()" onFocus="this.select()">
</form>
</body>
</html>

-----Original Message-----
From: javascript-bounces at LaTech.edu
[mailto:javascript-bounces at LaTech.edu]On Behalf Of Paul McGuire
Sent: Friday, February 18, 2005 10:37 AM
To: '[JavaScript List]'
Subject: RE: [Javascript] onBlur & onFocus together


Need to see code then

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

Hi!

Nope!

Bye,

Iztok

Paul McGuire wrote:
> Are you calling the function from more than one text field?
>
> 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:15
> To: [JavaScript List]
> Subject: [Javascript] onBlur & onFocus together
>
> 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