Client side Scrud implementation in JavaScript