On Mar 30, 9:36 pm, Walter Lee Davis wrote:
> Take a look at Form.Observer
I think you meant to reply to the OP.
> -- it's ideal for this sort of thing.
I don't think it is.
> It
> watches the form in a tight loop (at your specified interval) and if
> there are any changes to the form f
Take a look at Form.Observer -- it's ideal for this sort of thing. It
watches the form in a tight loop (at your specified interval) and if
there are any changes to the form from the last time, it fires a
function.
http://prototypejs.org/api/timedObserver
Walter
On Mar 29, 2009, at 8:55 PM
On Mar 28, 7:55 am, "Russell Keith"
wrote:
> I have an iframe and I am using the onbeforeunload to prevent data loss.
> What I need to do is set a variable called save to 0 after any change is
> made within the frame.
>
> I tried this but it doesn't work:
>
> document.observe('chang
You might want to try adding an observer to all form elements to detect when
the values change. For example:
var isDirty = false;
$$('input, textarea').invoke('observe', 'change', function()
{
isDirty = true;
});
-Hector
On Fri, Mar 27, 2009 at 3:22 PM, Stefano Esposito <
stefano.esposit...@
On Fri, 27 Mar 2009 16:55:58 -0500
"Russell Keith" wrote:
> I have an iframe and I am using the onbeforeunload to prevent data
> loss. What I need to do is set a variable called save to 0 after any
> change is made within the frame.
>
>
>
> I tried this but it doesn't work:
>
>
>
>