SiteKiosk Documentation
One Step Back

SetAuthInfo Method




The SetAuthInfo method sets username and password which will be used if the specified URL requires an authentication.


Syntax

    HTTPPost.SetAuthInfo(username, password)
Parameters
    usernameString that specifies the username.
    passwordString that specifies the password.
Return Value
    None.
Remarks
    None.
Examples
    The following example sends a HTTP request to Altavista and displays the response. Although it is not required, username and password are specified.

    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    mypost = SiteKiosk.Network.CreateHTTPPost();
    mypost.OnPostComplete = OnPostComplete;
    function OnPostComplete(success, response)
    {
       if (success<0) {alert("Error");} else document.write(response);
    }
    mypost.AddParameter("q", "sitekiosk");
    mypost.SetAuthInfo("myusername", "mypassword");
    mypost.Submit("http://us.altavista.com/web/results");
    </SCRIPT>
    

Applies to
    SiteKiosk v5.0 (and later versions).

Back to topBack to top

© 1997-2008 PROVISIO - Chicago, USA & Muenster, Germany - SiteKiosk DevTeam