[Greasemonkey] onpropertychange emulation
Aaron Boodman
zboogs at gmail.com
Thu Oct 13 20:56:45 EDT 2005
You could also use watch I think. If you have a ref to the form and form field:
myFormField.watch("value", function() {
myForm.submit();
});
- a
On 10/13/05, Matt Labrum <darktempler at gmail.com> wrote:
> :-/ well a javascript function has to fill that box because its a hidden
> field so maybe you could do something like...
>
> //move the function into a varible we know of
> var oldfunc = unsafeWindow.functionwhichchangesthat;
>
> //overwrite that function so we can call our stuff after it runs.
> unsafeWindow.functionwhichchangesthat = function (){
> oldfunc.apply(window,arguments);
>
> // call the onpropertychange function now! , or check to see if the data is
> changed etc.
>
> }
>
>
> so you can call your code after the function runs and stuff....
>
> On 10/13/05, Ilia K. <mail4ilia at gmail.com> wrote:
> >
> > Hi, All!
> >
> > I'm trying to make one IE-oriented site work in Firefox with the help
> > of greasemonkey and its amazing community (Thank you Lenny Domnitser
> > and David Kaspar!)
> > Now I'm need to workaround such a code:
> >
> > <input type=hidden name='page_pg_fnd'
> > onpropertychange="document.all('oFrm').submit()" value='1'>
> >
> > This input field is changed from several javascript functions, but
> > Gecko has no support for "onpropertychange" event and such a changes
> > don't trigger form submit (yeah, quite a poor design).
> > Has anybody any ideas, how to emulate the above thing in Firefox (1.5beta1)
> > ?
> >
> > Thanks.
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
More information about the Greasemonkey
mailing list