I
Ishaan Dogra
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
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