Code for javascript error message