System.Gadget.settingsUI = "settings.html";
System.Gadget.onSettingsClosed = settingsClosed;
function settingsClosed(p_event) {
//OK clicked?
if (p_event.closeAction == p_event.Action.commit) {
//yes, read settings here
}
}
gadgets Build Your Own Windows Vista Sidebar Gadget:
http://msdn.microsoft.com/en-us/magazine/cc163370.aspx
--
click the Ratings button. Voting helps the web interface.
http://www.microsoft.com/wn3/locales...help_en-us.htm see ''rate a post''
Mark L. Ferguson
"Ishaan Dogra" <> wrote in message
news:...
> Hi
>
> I am developing a vista sidebar gadget and I need to store the settings
> entered by the user. I am using the following code to save the settings,
> but I am not able to. I can't figure out what is wrong with it.
>
> function onSettingsUnload(event)
> {
> if (event.closeAction == event.Action.commit)
> {
> var user = username.value;
> var pass = password.value;
> System.Gadget.Settings.writeString("username", user);
> System.Gadget.Settings.writeString("password", pass);
> event.cancel = false;
> }
> else
> {
> event.cancel=true;
> }
> }
>
> Here username and password in the first two lines are the corresponding
> ids of the input boxes in the html file.
>
> Thanks in anticipation.
>
> Ishaan