fixing inline IF statement for the onchange example in documentation