logo

New Response

« Return to the blog entry

You are replying to:

  1. @Yogi: Extensibility is a part of Javascript, so any object you can prototype (not as in prototype.js but as in defining your own objects), you can later extend.

    @Jake: Another way to tackle the problem would be to write an wrapper function that would call the scriptaculous method and then process the result for you. That way you don't override all that functionality (hence making your code responsible for more or as much stability as the method you are overriding) and you have a layer that, being specifically for the purpose of tweaking the outbound data, provides a centralized point for doing so.

    So, you might have

    // Domino specific wrapper for Scriptaculous.serialize()

    function dominoSerialize(element) {

    var tmpstr = serialize(element); // call to scriptaculous

    regEx = /[\[\]]/g;

    tmpStr = tmpStr.Replace(regEx,"");

    return tmpStr;

    }

    I guess it boils down to an OO approach or an SOA approach. :-) Either is good - just depends on what your goals are. The later permits you to deflect concern about whether your code or theirs is the problem, if one arises.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: