July 10, 2007 at 12:38
· Filed under math, javascript, +geek
I just went through an exercise for a DOM scripting course with the YUI and had the task to write a function that takes any element and centers it at the current cursor position. I also wanted to make sure that the displayed object never causes scrollbars or gets cut off when the cursor is too high up the document.
Link
[Via Wait Till I Come]
Permalink
June 27, 2007 at 16:24
· Filed under javascript, +geek
’ve just put together a small DOM cheatsheet for some developers here and thought why not share it and CC it in case it can be handy for you.
Link
[Via Wait Till I Com]
Permalink
June 18, 2007 at 18:26
· Filed under javascript, +geek
Closures are one of the most powerful features of ECMAScript (javascript) but they cannot be property exploited without understanding them. They are, however, relatively easy to create, even accidentally, and their creation has potentially harmful consequences, particularly in some relatively common web browser environments. To avoid accidentally encountering the drawbacks and to take advantage of the benefits they offer it is necessary to understand their mechanism. This depends heavily on the role of scope chains in identifier resolution and so on the resolution of property names on objects.
Link
Permalink
June 15, 2007 at 18:56
· Filed under javascript, +geek
Javascript is becoming increasingly popular on websites, from loading dynamic data via AJAX to adding special effects to your page.
Link
[Via Better Explained]
Permalink
June 15, 2007 at 14:22
· Filed under javascript, +geek
Without a doubt Ajax application are becomming more powerful. That also means that Javascript files are getting bigger and more complex. One solution is to use mod_gzip and mod_deflate (Apache) or HTTP compression (IIS). This means adding extra processing time both at the server and the client, however. One other way to cut down on bandwidth and memory is to compress the Javascript, after all, the browser doesn’t need the nicely formated Javascript with white space and comments. You can just trim all of that out and save tons of space.
Link
[Via Path Finder]
Permalink
June 1, 2007 at 16:11
· Filed under javascript, +geek
JScript, as I noted yesterday, is a functional language. That doesn’t mean that it works particularly well (though I hope it does) but rather that it treats functions as first-class objects. Functions can be passed around and assigned to variables just as strings or integers can be.
Link
Permalink
May 30, 2007 at 15:24
· Filed under memory leak, internet explorer, javascript, +geek
If you are developing client-side re-usable scripting objects, sooner or later you will find yourself spotting out memory leaks. Chances are that your browser will suck memory like a sponge and you will hardly be able to find a reason why your lovely DHTML navigation’s responsiveness decreases severely after visiting a couple of pages within your site.
Link
Permalink
May 28, 2007 at 11:28
· Filed under microsoft, javascript, +geek
In the past, memory leaks haven’t posed huge problems for Web developers. Pages were kept relatively simple and navigation between different locations within a site was a great way to clean up any loose memory. If there was a leak, it was most likely small enough to go unnoticed.
Link
[Via MSDN]
Permalink
May 28, 2007 at 11:27
· Filed under javascript, +geek
Plugging memory leaks in JavaScript is easy enough when you know what causes them. In this article authors Kiran Sundar and Abhijeet Bhattacharya walk you through the basics of circular references in JavaScript and explain why they can cause problems in certain browsers, especially when combined with closures. After seeing some of the common memory leak patterns you should watch out for, you’ll learn a variety of easy ways to work around them.
Link
[Via IBM]
Permalink
May 28, 2007 at 11:03
· Filed under javascript, +geek
Event Cache is a small script which can store the events you have set on a page and remove them on unload. This way it can prevent memory leakage. Please read DHTML leaks like a sieve by Joel Webber for more information.
Link
[Via Novemberborn]
Permalink