Vista Sidebar Gadget Development

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top