Showing related tags and posts accross the entire site.
-
There is a slight modification for my previous post . The conditions for the if statement there is inadequate. The bug occurs when refreshing the browser when the mouse is beyond the leftmost side of the window, a valid yet unanticipated negative value for the X. This is evident especially for dual monitors...
-
This is in response to my previous post re JavaScript Hashtable Implementation . I modified my code to be able to remove elements, as well as get an enumeration of the elements in cases wherein the keys are strings rather than integers. Here are the new members of the Hashtable object: Methods: remove...
-
I needed to do some routines when a user has closed the window. I do not want those routines to trigger when refreshing the page or unloading the document; I just need them to happen when the browser window is closed. This is the usual proposed solution: assign a function on the onbeforeunload event...
-
In Internet Explorer, when you use window.close() in JavaScript to close the current browser window, you will be asked something like "A script is attempting to close this window. Do you want to continue?" As a programmer, this can be annoying if you are un -maliciously closing the window....
-
Apparently, you need to set the SelectionLanguage property of a JavaScript XML Document object to XPath so you can select nodes via XPath. var xmldoc = new ActiveXObject("Microsoft.XMLDOM"); // or var xmldoc = new ActiveXObject('Msxml2.DOMDocument.3.0'); xmldoc.async = "false";...
-
I needed a hashtable implementation in JavaScript and here's what I’ve come up. It is used like this: var ht = new Hashtable(); ht.put( “key” , “value” ); var val = ht.get( “key” ); // returns null if not found The implementation is like this: function Hashtable(){ this .hash = new Array(); this...