Recoding OnClick script for Grammar.class