Preventing page unload with JavaScript

The onbeforeunload event handler (supported by Internet Explorer 4+ only) can be used to confirm that the user does want to close the browser window or navigate away from the current page. If your event handler returns something, this message will be included in a confirmation which the user must... [Read More]
Tags: javascript

A JavaScript Vector object

I love the convenience of the Java Vector object, and JavaScript doesn’t have anything similar to use, so I created this basic class to emulate it. ```javascript /** Vector object simulating the vector object used in the Java programming language. */ function Vector() { this.myArr = new Array(); this.size =... [Read More]
Tags: javascript