Vista Gadget Development & JavaScript

By: Justin Braun
Posted on: September 27, 2007

One of the first things that I noticed when learning how to develop sidebar gadgets was that the code behind them was a combination of HTML and JavaScript. The biggest problem is that it was JavaScript, something that I am not well versed in. I looked through several samples and tried some different samples and pretty much have learned the basics of what I need to know, but some of the commands still require me to reference the web or Google certain topics.

I developed a gadget to display specific weather data from my weather station and leveraged what I learned about JavaScript to use XMLHTTP. It worked fine unto a couple days ago when the gadget stopped responding and couldn’t connect to the datasource even though I can do some from a browser. From what I can tell, I must be hitting some sort of connection limit, or I have an object that is not being nulled out. I did change my code to use synchronous processing on the XMLHTTP object, and that seemed to work, but the gadget will sometimes lock up the whole sidebar. Now, that is a nice bug!

So … not a big fan of JavaScript, but making it work. I do like the error handling against what is available using VBScript. Needless to say, it would be nice if gadgets supported C# or VB.NET natively instead of requiring some type of COM access.

Related Articles

Improper Rendering of XAML?

I’m working on a project right now and have noticed that XAML seems to be incorrectly rendered in

Date Tracker Sidebar Gadget

I've changed my mind and decided that a Date Tracker will be the Vista Sidebar Gadget that will be the subject of my series on gadget development.

Be More Fluid with the New Storage Center Command Set for PowerShell

Windows PowerShell was designed as a scripting language to help IT administrators automate repetitiv