Tag: script


jQuery : To check if an element is present in the page or not

This is a precautionary measure that you can adopt, if you are doubtful about the presence of a particular control in the page. Under normal scenarios, in case if the element is not there, it would throw an error. But you can now check if that particular element is present in the page or not, ...


How to suppress nagging javascript errors?

To suppress javascript error popups and warnings in your browser, just use the code snippet below: <SCRIPT language="JavaScript"> <!-- function silentErrorHandler() {return true;} window.onerror=silentErrorHandler; //--> </SCRIPT> This however has some limitation, from what i had experienced. It works well in IE, to a major extend in Firefox, but not much in Opera and Safari. Hence ...