fixed errors in js file
finished on ajax call to update frames
changes in js file