Alert and Sidebar
Have you ever tried to use an javascript Alert in your Sidebar Gadget?
It won't work...you'll have to use a little trick to make that work. I do advise you not to use it in your deployed version, but it makes sense for some sort of debugging or testing
You can use ActiveX and WScript.Shell object to create popups:
var objShell = new ActiveXObject("WScript.Shell");
objShell.Popup("This is a popup from Sidebar");