nextwebgen.com

The Next Generation Web Now

BJAX with Greasemonkey in Firefox and IE

Filed under: Web 2.0 News, Front Page, Examples, IE, Firefox — Dietrich Kappe at 9:07 am on Tuesday, August 1, 2006

On the heels of my post about BJAX (Browser Extensions plus AJAX), I received a flood of requests asking for an example of how to build such an extension. In response, I've put together a Greasemonkey script that demonstrates how to add a simple Ajax widget to a third party web page. The example isn't particularly useful -- a translucent box that floats over the google search page and displays the current weather, updated every minute, in downtown Chicago -- but it does illustrate the basics of using GM_xmlhttpRequest as well as the pitfalls of writing Javascript that executes in the Greasemonkey sandbox. An article discussing an updated version that adds support for IE (using the Turnabout extension) and the ability to toggle the size of the widget can be found here.

www.google.com_search.png

If you want to do any serious development in this environment, of course, you'll want to port an Ajax framework across to use GM_xmlhttpRequest instead of XMLHttpRequest, and obey the other restrictions of the Greasemonkey sandbox.

IE 7 distrubted in Windows Update

Filed under: Web 2.0 News, Front Page, IE, Browsers — Dion Almaer at 12:08 pm on Monday, July 31, 2006

The IE 7 team just let us know that IE7 is to be distributed via Automatic Updates!:

As we get close to the final availability of Internet Explorer 7, I want to provide an update on our distribution plans. To help our customers become more secure and up-to-date, we will distribute IE7 as a high-priority update via Automatic Updates (AU) shortly after the final version is released for Windows XP, planned for the fourth quarter of this year.

This doesn’t mean that the old IE’s will disappear in short order, but it nice to see that we may see a quicker uptake to IE 7 than past releases.

IE7 XMLHttpRequest - Native or Not?

Filed under: Web 2.0 News, Front Page, XmlHttpRequest, IE — Michael Mahemoff at 2:42 pm on Friday, July 28, 2006

MS announced this week that IE7 will be pushed as a high-priority update, so we can expect it to be popular pretty quickly. Reader Shawn Lauriat brought our attention to the question: How native is IE7’s XMLHttpRequest?

The IE team have promoted the new IE7 as including native XMLHttpRequest. This is the case, insofar as you can instantiate an XHR using new XMLHttpRequest(). More importantly than the syntax, XHR will still work when ActiveX has been disabled (unlike IE6 and below).

On the other hand, Shawn notes that some issues exist. Some have pointed out that its more of a native facade than a native Javascript object. Specifically:

  • xhr.prototype fails. Indeed, it’s reported that any dynamic member creation fails (e.g. xhr.callId = 25; an idiom that can be useful for Call Tracking). If this is still the case, it’s not the behavior of a native object and it’s not consistent with other browsers.
  • It’s also worth pointing out that IE has an option to disable native XHR. (Aside: can we switch to positive terminology already - “enable” rather than “disable” … it’s hardly a secret of HCI that options should be stated in the positive :-/). The XHR option is, reasonably enough, motivated by security. Although it sounds like XHR will default to enabled (sorry, “not disabled”), it’s still a reality that some users will be continue to be lost if you rely on XHR. Don’t throw out that IFrame just yet!

IE7 XHR - Native or Not?

XMLHttpRequest Case-Sensitive in IE7

Filed under: Web 2.0 News, Front Page, XmlHttpRequest, IE — Chris Cornutt at 7:59 am on Thursday, July 20, 2006

Sleepyhead has posted a quick note about the XMLHttpRequest support in Internet Explorer 7, some bad news - it’s case-sensitive.

The native XMLHttpRequest object in IE7 is case-sensitive. This is no big surprise - however that was not the case with the XMLHttpRequest active-x object in earlier versions of IE. So if you have old code that used uppercase in method/functions that worked with IE6 you have to change it for it to work in IE7. Took me a while to figure out why an old script of mine wasn’t working…

He gives the code example for his fix, noting that “Status” will no longer be the same as “status”.