Errors working
Added javascript handling