More robust javascript.