trying to incorporate javascript. updated database and some classes etc for this purpose, but not working atm