#159 enhancement
Juriy Zaytsev

Form.Observer to pass changed element to a callback

Reported by Juriy Zaytsev | June 11th, 2008 @ 05:33 AM | in 1.7

As per this thread http://groups.google.com/group/r... an enhancement patch to pass a reference to a "changed" form element into a callback

Comments and changes to this ticket

  • Juriy Zaytsev
  • Juriy Zaytsev

    Juriy Zaytsev June 11th, 2008 @ 05:33 AM

    • State changed from “new” to “enhancement”
  • Tim Fluehr

    Tim Fluehr April 29th, 2009 @ 10:16 PM

    • Tag set to needs_tests, patched

    Hi Juriy,

    I've finally had the time to create a patch (as well as some additional enhancements) to some changes I made concerning this ticket. I had opened up a ticket previously (but didn't have a patch at that point).

    I can post the patch I made here if you want, or would it be better to open up a new discussion in the core group?

    Summary of my changes:

    Form.observer will do the following with the enhancements: * all changes are optional with and additional bool parameter to activate the new code * tries to get around the dropdown select hover issue in Firefox * passes the changed element(s) as an array to the callback function * takes an additional optionsl parameter timeDelay for when text/textArea elements have been changed to prevent the callback from being called too often

    I'm positive that there is a lot of room in my code for optimizations/improvements, as this is my first attempt at working changes into the core code of Prototype. Up until now I've simply been wrapping/overriding things outside of Prototype.

  • Tim Fluehr

    Tim Fluehr April 30th, 2009 @ 07:53 PM

    Let me know if you want a patch with the changes/tests.

    I've update my fork of Prototype with the changes and some basic unit tests.

    http://github.com/tfluehr/protot...

    As well as a better description of the changes:

    http://wiki.github.com/tfluehr/p...

    I ran the form unit tests under windows and everything passed for Chrome, Firefox 3, and IE7

  • Tobie Langel

    Tobie Langel July 24th, 2009 @ 02:26 AM

    • Tag changed from needs_tests, patched to missing:tests, patched

    [not-tagged:"needs_tests" tagged:"missing:tests" bulk edit command]

  • Tobie Langel

    Tobie Langel July 24th, 2009 @ 03:36 AM

    • Tag changed from missing:tests, patched to needs:tests, patched

    [not-tagged:"missing:tests" tagged:"needs:tests" bulk edit command]

  • T.J. Crowder

    T.J. Crowder November 16th, 2009 @ 04:50 PM

    • Assigned user cleared.

    [responsible:none bulk edit command]

  • Tisho Georgiev

    Tisho Georgiev March 2nd, 2010 @ 09:22 AM

    • Tag changed from needs:tests, patched to needs:tests, patched, section:dom
  • WillisJensen

    WillisJensen April 18th, 2018 @ 02:19 PM

    Hey, I am busy these days with my paper writers for hire so I couldn't get a chance to see the Form.Observer to pass changed element to a callback. Keep sharing!

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

Attachments

Pages