Articles/Tips/Howtos on JavaScript
How do I execute scripts in the content retrieved using Ajax?
Ajax enables Web application developers to build highly responsive Web interfaces. Ajax also comes with a lot headaches. One such problem arises when the content returned by an Ajax call contains JavaScript. By default this script won’t be executed by the browser and any JavaScript functions in the Ajax content won’t be available to the [...]
Confirm closing of browser window using onbeforeunload
While using a Web application, users may accidently close the browser by clicking on "close button". For application windows which are used for extensive data capture, it is better to provide a confirmation message before the browser is closed. This is where onbeforeunload event of body/window object can be used.
An event handler JavaScript function can [...]