added js to show error