Committing HTMLPages and corresponding javascript mesage