guys
I'm running a wonderful website with prototype, the israeli chess
website atwww.ichess.co.il
here are some stuff that I think are missing from prototype :

1. mouse wheel event (I found some custom code that did it)
2. ajax abort method
3. error handling (cross browser code that catches errors and returns an
object with the URL, stack trace,etc)
    I think its even possible that the entire prototype code will be run
under try catch so that error can be reported even
    from within prototype
4. some more string methods here are some custom stuff that I added in my
scripts (for ideas...)
5. some more array methods (like get from array with a field/id in the
objects in the array, check if array contains a value, etc)

below - some functions that I added for ideas...

Thanks
Ran

String.prototype.trim = function() {
    return this.replace(/^\s+|\s+$/g,"");
};

String.prototype.ltrim = function() {
    return this.replace(/^\s+/,"");
};

String.prototype.rtrim = function() {
    return this.replace(/\s+$/,"");
};

String.prototype.removeLastChar = function() {
    return this.substr(0, this.length - 1);
};

function isValid(object)
{
    return (object !== null) && (object !== undefined);
}

function isValidString(str)
{
    return (isValid(str) && (str !== ""));
}

function isValidEmail(str)
{
    if (! isValidString(str)) {
        return false;
    }
    return (/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,4}$/).test(str);
}

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to