Hi,

to access a form that is dynamically inserted in a page, I use this
code:

    document.body.addEventListener( 'DOMNodeInserted',
        function( event ) { GroupQuoteMailContainer(event.target); },
false );

    function GroupQuoteMailContainer( container ) {
        var msgform = $('#message-form');
        if( msgform ) GroupQuoteMail( msgform );
    }

    function GroupQuoteMail( node ) {
        alert( 1 );
    }

But in some circumstances (maybe because the site itself touches the
form, I do not know), my function GroupQuoteMail() is called more than
once with exactly the same node.

Is there an easy way to prevent such duplicate calls? Or to detect and
skip dupes it in an easy way?

Tnx in advance.


Regards,
Robert

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to