Tab Out Event

I’m trying to trigger a javascript event (fading in an image) after
a form (text, text-area) field has been exited and presumably filled-
in either by tabbing out or clicking on the next field, not when the
field is initially selected? I can set the onfocus event to trigger,
that’s easy, but I’ve been unable to get the above method to work.

Todd


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Have you tried observing the form element’s blur event? If you want to
be specific to “the field lost focus and it changed somehow in between
gaining and losing focus” then you want to observer the change event.

<input type="text" id="foo" value="" name="foo />
<script src="prototype.js" type="text/javascript"></script>
<script type="text/javascript">
var foo = $('foo');
foo.observe('blur',function(evt){alert('I had your attention')});
foo.observe('change',function(evt){alert('I changed')});

Walter

On Jan 19, 2009, at 2:07 PM, Todd wrote:

I’m trying to trigger a javascript event (fading in an image)
after a form (text, text-area) field has been exited and
presumably filled-in either by tabbing out or clicking on the next
field, not when the field is initially selected? I can set the
onfocus event to trigger, that’s easy, but I’ve been unable to get
the above method to work.

Todd


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I can set the onfocus event to trigger, that’s easy

onblur?

k


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

My mistake. Yes, it should be onblur. I was doing something else with
onfocus and got them switched around.

T.

On Jan 19, 2009, at 2:31 PM, Keith Martin wrote:

I can set the onfocus event to trigger, that’s easy

onblur?


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options