" /> " /> Learn Dash AJAX Dot Com -
Welcome to Learn Dash Ajax Dot Com

Internet Explorer's Infamous Operation Aborted Error

Monday, January 18, 2010
This has been written about a lot, but people seem to still post questions about it, so I thought I'd add my little experience about it as well in the hope that people find the answer to this issue quicker when Googling.

The infamous Operation Aborted error is Internet Explorer's (and only Internet Explorer) way of dying very ungracefully when loading a web page. Googling it will result in all kinds of solutions, but the plain and simple facts are this. This error only occurs if you try to manipulate a DOM element via JavaScript before the element you are trying to manipulate is loaded. Below are two sample HTML examples illustrating this point. Open each of these files in Internet Explorer (IE) 6 or 7 to see the differences.


This is no longer an issue in IE8... well it's still an issue, but a little quieter about it and it actually renders pages now instaed of showing you the page for a split second than giving you the error (IE7 and <). See this article, What Happened to Operation Aborted?, http://blogs.msdn.com/ie/archive/2008/04/23/what-happened-to-operation-aborted.aspx).

This issue can also occur because of a race condition that occurs due to an Internet Explorer/ASP.Net AJAX bug. The probability of encountering this issue increases when the application has a significant number of ASP.Net AJAX enabled server controls on the web page. The issue is explained here, http://seejoelprogram.wordpress.com/2008/10/03/fixing-sysapplicationinitialize-again . I added this fix to my project and all is good now. This fix from what I can tell is still required if using ASP.NET 3.5 SP1. If you're interested, I raised the question about the AJAX issue here on Stack Overflow, http://stackoverflow.com/questions/757758/internet-explorers-operation-aborted-and-latency-issue .

Enjoy.

Labels: , ,

Microsoft's Doloto and IBM's EGL

Wednesday, September 9, 2009
IBM's EGL, http://www-949.ibm.com/software/rational/cafe/community/egl, is meant to make building Web 2.0 apps a lot more easy. Looks interesting. Basically you program in the EGL language and they generate Web 2.0 pages for you and you can debug it without having a server. I don't develop in Java or use Eclipse really so I probably won't touch this one, but still interesting.

Microsoft has released Doloto, http://research.microsoft.com/apps/pubs/default.aspx?id=70518, that from what I can tell just pushes the JavaScript you need as you need it. Can I coin the term Javascript on Demand (JoD) or has someone already claimed this? :) Doloto profiles your application and then it figures out which JavaScript you need and makes stubs for functions that are not required right away and groups functions into groups that are downloaded together called clusters. So, once once it's profiled your app, the new JavaScript can be uploaded to your server to improve performance.

According to, Somasegar's WebLog, http://blogs.msdn.com/somasegar/archive/2009/09/04/doloto-on-devlabs.aspx, "In our experiments across a number of AJAX applications and network conditions, Doloto reduced the amount of initial downloaded JavaScript code by over 40%, resulting in startup often faster by 30-40%, depending on network conditions."

I'm just wondering how this works with dynamic pages and 3rd party components that have their own JavaScript. I understand what they're doing, but how do you get 3rd party components to not send the original JavaScript to the client as well that shipped with the component because a lot of times these are embedded resources.

Thoughts anyone?

Labels: , , , ,

AjaxControlToolkit CascadingDropDown Issue with FireBug

Friday, March 27, 2009
Well I found a debugging issue today trying to implement something with the AjaxControlToolkit's CascadingDropDown control.

A page I was working on had four CascadingDropDown controls on it and even though on the server side, they were disabled, i.e. .Enabled = false, when rendered on the client, they would be disabled for one second than become readable. It had to do with populating the picklist with the web service call.

So I was trying to use the picklist.CascadingDropDownBehavior.add_populated method to add a function that disabled things after the dynamic data was populated. In Internet Explorer, no issues. In FireFox, FireBug was launching the debugger sometimes but then my add_populated method was never firing. I was going nuts.

In a last ditch effort I said, maybe I'll just disable FireBug as the clients will most likely not have it installed. I restarted FireFox with FireBug disabled and all was good. I must say that wasn't obvious. The issue I describe occurs with FireBug 1.3.3. Maybe it's only this version, I don't know. Just thought I'd mention it in case someone else ends up pulling their hair out because of this.

And for code's sake, here's what I did to disable the CascadingDropDown on the client-side:



function pageLoad(sender, args) {
DisablePickLists();
}

// Note: If you need to debug this in FireFox, FireBug doesn't really work. I tried and I was able to debug below intermittently
function DisablePickLists() {
// picklistClientIDs is populated in FormAppointmentBase.cs
if ("undefined" !== typeof(picklistClientIDs)) {
var populated = function(sender, args) {
var picklist = sender._element;

// I don't check for the existence of the picklist because it has to exist. The element IDs being returned are from server-side
// code that got the clientIDs of server controls.
var myInterval;

myInterval = setInterval(function() {
if (sender._isupdating) {
return;
}

clearInterval(myInterval);
picklist.disabled = true;
}, 20);
};

for (var index=0;index < picklistClientIDs.length;index++) {
var currentID = picklistClientIDs[index];
var picklist = $get(currentID);
picklist.CascadingDropDownBehavior.add_populated(populated);
}
}
}

Labels: , , , , ,

Pretty Print for FogBugz Greasemonkey Script

Thursday, March 12, 2009
Well, we use FogBugz at work for logging cases and for a wiki. I needed to print some stuff the other day and didn't like it showing the header and footer of FogBugz, so I wrote a GreaseMonkey script to remove them. Check out the script on userscripts.org here.

This is a firt version of this script, so one thing you need to do is have this script disabled until you go to the page you want to print. Once you're on that page, enable the script and refresh the page. Print it then disable the script and refresh the page to get your header and footer back. I'll add a button to turn it on and off soon, but for now, it is what it is.

Labels: , ,

Google's Tip Jar

Friday, March 6, 2009
I heard about this neat little app called Tip Jar from Google via my codeproject.com newsletter. It's a neat little app that allows anyone to submit useful tips to help us all during this gloomy recession period. Here's the original article, http://www.webpronews.com/topnews/2009/03/05/google-offers-money-saving-tips-with-tip-jar and here's my first tip, http://moderator.appspot.com/#8/e=3cfc .

Labels: , , , , , ,

Learning AJAX APIs Made Easier: Google Releases API Playground

Friday, January 23, 2009
I can't take credit for this find. I received this via my codeproject.com daily newsletter. And I guess they can't take credit for this either, because it was Frederic Lardinois that wrote the article Learning AJAX APIs Made Easier: Google Releases API Playground .

Anyways, the article points to some cool AJAX stuff that Google has done and gives you a playground, AJAX API Playground, to test it. I haven't really used any of the Google AJAX stuff except for a Google Map that I added to this site. Some of the widgets are pretty cool though like the gauge widget .

Labels: , , ,

My AJAX Ramblings/Rant

Friday, November 21, 2008
AJAX! Web 2.0! Rich Internet Applications (RIA)!

Here's my little explanation about AJAX, some AJAX history, some ramblings and some pet peeves I have about the way people refer to it. It's basically one of my brain barfs, not necessarily well thought out. I just felt like writing down some thoughts in no particular order.

Well first off, you've probably heard about AJAX in the past few years. AJAX stand for asynchronous JavaScript and XML. Jesse Garrett is the one who coined this cool acronym.

All this stuff is nothing new even though it might appear to be. Those who've been in the web business since the late 90s probably know this, but AJAX has existed since Internet Explorer 5 (maybe 4, I can't remember). The only reason why it's more popular today and more widely used is because all the major browsers support it now.

Microsoft had an ActiveX object (and still do) called the XmlHTTPRequest object. This was what allowed for server calls in the background that when combined with dynamic HTML (DHTML) gave you AJAX. As far as I know, they were the first browser to have the XmlHTTPRequestObject. Mozilla followed suit later on as did other browsers. I wonder if it's safe to say that Microsoft and/or or Internet Explorer developers were the first ones to use/invent AJAX? (queue Linux users cursing). I'm not pro Microsoft or anything even though I develop in it all day long, but it seems like the last statement I wrote appears to be true. BTW, I love FireFox and am psyched for 3.1 with its JavaScript engine SpiderMonkey using TraceMonkey to speed up JavaScript performance.

Anyways, my major pet peeve about AJAX is that so many people confuse it with DHTML. Great libraries like Prototype, jQuery and Dojo are just JavaScript libraries that interact with the DOM to create cool DHTML effects. The AJAX component in all these libraries is quite tiny. Each of these libraries have some objects that at the lowest level end up calling the browser's XmlHttpRequest object. Aside from that, the rest is all DHTML.

Another thing about AJAX is its not always AJAX nowadays. A lot of people have switched to using JSON instead of XML, which would make it AJAJ I guess. Just doesn't sounds as cool though eh? Maybe AJ2? JSON was created by Douglas Crockford, who is the man when it comes to JavaScript. I prefer to call him the Crockenator even though I have never met him. If you look at John Reisig of jQuery fame, you'll notice that he follows a lot of what the Crockenator teaches. I can't stress enough how much you should read the Crockenator's book JavaScript: The Good Parts. It still amazes me how many web developers don't know JavaScript. In my eyes you don't know web unless you know JavaScript. Zing!

Rich Internet Applications however, have been around since Java Applet's existed. Think of applets as the predecessor to the XmlHttpRequest objects of browsers. Although some sites still use applets, I don't think they ever really caught on because Internet speeds were pretty slow at the time they first came onto the scene. As well, I don't know if it's just me, but I've always found applets super slow.

Anyways, that concludes my first online ramblings/rant. Please leave some comments if you have any.

Cheers,
Nick

Labels: , , , , , ,


AddThis Feed Button   Bookmark and Share