Some progress on javascript, still doesn't work