CakePHP html formater written in javascript