Results 1 to 4 of 4

Thread: Is there a way to fire javascript in a table onBlur?

  1. #1

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057

    Is there a way to fire javascript in a table onBlur?

    I have a table that has elements in it (inputboxes, checkboxes, comboboxes) and right now I have an onBlur in each element that runs a script to update the value of the elements to the database. To be more efficiant I wanted to see if I could update the database when the user leaves the table rather than each element in the table. I tried to do a test with the onBlur of the table but it didnt fire so I was wondering if it was even possible... anyone know?
    Thanks
    Michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  2. #2
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    http://www.w3.org/TR/html4/struct/tables.html#h-11.2.1

    I imagine that the triggers are reserved for form elements, since a table won't really ever have focus, much less loose it.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  3. #3
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Sorry, this page helps more...

    http://www.w3.org/TR/html4/interact/scripts.html#events

    onfocus = script [CT]
    The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: A, AREA, LABEL, INPUT, SELECT, TEXTAREA, and BUTTON.

    onblur = script [CT]
    The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  4. #4

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    ok thanks,
    thats what I was afraid of... no problem though, i'll just keep it the way it is.
    Thanks again,
    Michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width