Menu:

Recent Entries

Categories

Archives

Links

Blogs
- Dflying's Night
- David's Untitled Life
- Dflying's Blog in Chinese

This blog is hosted by DreamHost!

Syndicate

RSS 0.90
RSS 1.0
RSS 2.0
Atom 0.3

AJAX with Callback Url and Url Rewriters

Dflying | 10 March, 2006 21:25

The second parameter of the XmlHttpRequest.open method is the Url of the callback page:

xmlRequest.open("GET", url, true);

 (More)

Posted in JavaScript & AJAX . Comment: (0). Trackbacks:(1). Permalink

XmlHttpRequest in IE / FireFox

Dflying | 10 March, 2006 21:22

The XmlHttpRequest object has been introduced in IE 5.5 silently more than 5 years ago, without the AJAX cheerleading and hype we are seeing today. The technology at this point only allowed an ActiveX approach to the problem. A few years later, folks at the Mozilla camp decided to forget their religious and standards based passion and "borrowed" the technology from Microsoft. Since Gecko browsers do not really like ActiveX (which is a good thing), the guys implemented it as a built-in object. Hence now we are having the IE ActiveX XmlHttpRequest vs. the built-in XmlHttpRequest in FireFox. (More)

Posted in JavaScript & AJAX . Comment: (3). Trackbacks:(198). Permalink

XmlHttpRequest – Choose GET or POST?

Dflying | 10 March, 2006 20:24

XmlHttpRequest supports both GET and POST requests to the server, which one should we use? As usual, GET is light and POST is heavy. But I'd say, it really depends on your scenario.

GET requests pass parameters to the server using the query string. So we need to be careful about:

 (More)

Posted in JavaScript & AJAX . Comment: (27). Trackbacks:(330). Permalink

How to View the Dynamic HTML Source

Dflying | 10 March, 2006 20:07

Developing and debugging AJAX apps can be very tricky. The AJAX technology went on relatively soon while the development tools are slow and still catching up, so you do need to use a bag of neat tricks AND dirty/ugly hacks to see what is really going on. The first problem for beginners is where is the HTML output I wrote to the page?

 (More)

Posted in JavaScript & AJAX . Comment: (0). Trackbacks:(92). Permalink

Memory Leak Detector for IE

Dflying | 10 March, 2006 18:38

IE leaks memory, it is a well known fact acknowledged by the Microsoft IE team in their blog and in an article in MSDN ridiculously named Understanding and Solving Internet Explorer Leak Patterns. AJAX callbacks and page updates do not magically workaround this problem - updating the page and scripts on the page after AJAX calls do trigger the "leak patterns" of IE too. If this turns out to be a problem in your application, the best starting point is (as usual) quirksmode.org.

Here comes the Drip tool at http://www.outofhanwell.com/ieleak/. The must-have tool is a nifty little utility that starts your web-page, detects leaks and shows details for each leak.

 (More)

Posted in JavaScript & AJAX . Comment: (0). Trackbacks:(0). Permalink

JavaScript Variable Scope

Dflying | 10 March, 2006 17:39

In JavaScript, there's a 'wired' feature that the variable scope is only the function. For example, in the following code:

var i = 1;
{
    var i = 2;
}
alert(i);

You will get 2 alerted. That's really interesting and everyone should pay more attention to.


Posted in JavaScript & AJAX . Comment: (0). Trackbacks:(100). Permalink