views:

74

answers:

1

hello !

i have a problem with a variable for the flyout :

    var friendsUser = "";
    var friendsMdp = "";


    System.Gadget.Settings.write("variableName", variableName);
    System.Gadget.settingsUI = "Settings.html";
    System.Gadget.onSettingsClosed = SettingsClosed;
    System.Gadget.Flyout.visible = SettingsClosed;



    function SettingsClosed() {
        variableName = System.Gadget.Settings.read("variableName");
        friendsUser = System.Gadget.Settings.read("friendUser");
        friendsMdp = System.Gadget.Settings.read("friendMdp");
        setContentText();
    }

    function flyFriends()
    {
    System.Gadget.Flyout.file = 'friends.htm';
    System.Gadget.Flyout.show = true ;

    var flyoutDiv = System.Gadget.Flyout.document.parentWindow;
    flyoutDiv.gMyVar = friendsUser;
    flyoutDiv.gMyVar2 = friendsMdp; 
    }

If i use this my flyout var is undefined , and if i write : var friendsUser = "test"; i have Test in var and after use setting i have nothing ... if i write var in flyoutDiv before System.Gadget.Flyout.show = true ; gadget bug .

my settings dont have a problem, but the refresh of the var ...

have you a idea ?

thank you for all !

A: 

var variable = System.Gadget.Settings.read("friendsUser");

in the flyout for us var settings

Jiinn