Archive for the ‘Ajax’ Category
Monday, January 7th, 2008 |
Ajax is comparatively new to the world of programming and software. So far, only few people have cracked the use of this program without the use of toolkits. Only God knows how many people who can actually code without using toolkits but I’m willing to bet that they don’t really reach that much. Saying that only a rocket scientist could figure out how to properly code Ajax is probably an understatement considering its requirements from a developer.
But if you have figured Ajax out, good for you. On my end, I was able to do a little bit of Ajax project from time to time but I still have troubles figuring things out. It’s still a matter of trial and error for me.
In my journey in figuring out Ajax, I came into contact with one of the peculiar situation that will only happen to Ajax. If you have been to the world of programming language, you may already have encountered innerHTML. This little tool is often used by programmers to easy write objects in a DIV. Although the longer way of using DOM is also good, programmers naturally select the easier way… including me.
(more…)
Popularity: 9% [?]
Posted in Ajax | No Comments »
Monday, January 7th, 2008 |
The reason I am writing this article is because of some work I have been doing recently. My client wants a persistent AJAX application to work in IE6+. This means the web page will be left running for days/weeks on end without being refreshed or the browser being closed. This means it cannot have ANY memory leaks.
I currently process incoming XML using an XSL document – which works very well. However when done under IE6 the XSL transformation is output as plain text [please let me know if there is a DOM alternative] which means the only way to insert my newly transformed code is to use innerHTML. This seems to leak memory like a biatch! Note that the leak doesn’t occur in FireFox.
So why does innerHTML leak? Well after some digging I found out a few interesting facts – lets look at the who, where, why and how…
(more…)
Popularity: 9% [?]
Posted in Ajax | No Comments »
Tuesday, January 1st, 2008 |
Thanks very much for the following articles as it solve my pain about ajax.
If you want to do cross-domain scripting with XMLHttpRequest, e.g. fetching data from a remote location but you’re on a local page or local XUL application (file:///), you need to tell Mozilla/Firefox about that, otherwise you get the infamous error:
Error: uncaught exception: Permission denied to call method XMLHttpRequest.open
Below is an example that can be run locally (save it to your harddisk and open the page with Mozilla/Firefox). It will fetch some RSS XML data from wunderground.com and alert it.
Always remember: XMLHttpRequest needs UniversalBrowserRead!
If the page with the XMLHttpRequest is on a http:// URI (on a webserver), it is not possible to fetch data from another domain!!! This is a security measure of Mozilla/Firefox.
(more…)
Popularity: 42% [?]
Posted in Ajax | No Comments »