Avatar
💡
14 results for Javascript
  • In the comments for my post from the other day titled “Encapsulating Ajax XMLHTTPRequest Calls within JavaScript classes”, Kevin F noted that using document.write was not allowed within an XHTML document. Now, this isn’t directly related to Encapsulating Ajax calls, as you could have a non-visual class that doesn’t need to write visual content out to the browser. However, I wanted to post an update to the original example that shows how to do this that would be valid within an XHTML document.
    javascript Created Tue, 07 Feb 2006 12:08:01 +0000
  • The guys over at Fold posted an article on how to use multiple XMLHTTPRequest (XHR) calls within a single page. This is something that I have had to tackle in my own work, and though I would write up how I solve this issue. This post describes a simple technique for encapsulating XMLHTTPRequest calls within JavaScript classes. In general, this makes code more maintainable, allows for the creation of easier to use APIs, and makes it much easier to create components / widgets that load data from the server.
    javascript Created Tue, 31 Jan 2006 12:28:01 +0000
  • Just a quick fyi, but if you are doing work in JavaScript and need to dynamically remove all of the childNodes from a DOM element, make sure to do it with a while loop, and not a for loop. For example, this is bad: function removeChildrenFromNode(node) { if(node !== undefined) node !=== null) { return; } var len = node.childNodes.length; for(var i = 0; i < len; i++) { node.removeChild(node.childNodes[i]); } } Since, as soon as you remove one child, the length of node.
    javascript Created Tue, 24 Jan 2006 12:31:01 +0000
  • Just this week I switched to OS X and found my self wanting to really take advantage of the shell. I have always wanted to be able to do shell scripting in a language that I know well, and I finally found a solution (I know enough bash shell scripting to get in trouble). You may have heard of the Rhino project. A Mozzila project for creating and maintaining a Java based JavaScript parser.
    javascript Created Sat, 06 Dec 2003 12:56:01 +0000
Previous