﻿// This function calls the Web service method 
// that returns an XmlDocument type.  
function HelloWorld() 
{
    YouSeeWebsite.Services.YouSeeAjaxServices.HelloWorld(SucceededCallback);
}

// This function calls the Web service method 
// that returns an XmlDocument type.  
function GetSolutionArticle(guid) 
{
    YouSeeWebsite.Services.YouSeeAjaxServices.GetSolutionArticle(guid, SucceededCallback);
}

// This is the callback function invoked if the Web service
// succeeded.
// It accepts the result object as a parameter.
function SucceededCallback(result, eventArgs)
{
    // Page element to display feedback.
    var RsltElem = document.getElementById("ResultId");
    RsltElem.innerHTML = result;
}


// This is the callback function invoked if the Web service
// failed.
// It accepts the error object as a parameter.
function FailedCallback(error)
{
    // Display the error.    
    var RsltElem = document.getElementById("ResultId");
    RsltElem.innerHTML = "Service Error: " + error.get_message();
}

if (typeof(Sys) !== "undefined") Sys.Application.notifyScriptLoaded();
