OnPostComplete Event



 
Fires when a request has been completed.


Syntax

    HTTPPost.OnPostComplete = handler
    
Parameters
    success HRESULT value that indicates if the request was successfull.
    response String that contains the response.
Remarks
    A negative HRESULT value means failure, all other values mean success.

    The object that caused the event can be referenced in the event function using "this".
Examples
    The following example sends a HTTP request to Yahoo and displays the response.

    <div id="id_plugin">Add a plugin</div>
    <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("p", "sitekiosk");
    mypost.Submit("http://us.yhs4.search.yahoo.com/");
    </SCRIPT>
    

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

Back to top