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

Writing to the Event Log in C #

When I'm writing code, I don't like to spend a lot of time fumbling around the framework.  Like

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

Microsoft Web Platform Installer 2.0 RC

If you haven’t checked it out, do it now.  The Web Platform Installer makes your life a lot e