"A documented bug is not a bug; it is a feature." - James P. MacLennan

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 [...]

April 27, 2008 | Posted in JavaScript | No Comments »

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 [...]

April 25, 2008 | Posted in JavaScript | No Comments »