// The example below is for using Ajax and a webservice 
// 
// This function calls the Web service method and 
// passes the event callback function.  
function btnBoodschappenlijst_clickAjaxJS(ItemCode,PopupIdIncom,PopupIdIncom2)
{

//alert('waw' + ItemCode + ' ' + PopupIdIncom)
VH.Boodschappenlijst.WebService.set_defaultUserContext(PopupIdIncom + "$" + PopupIdIncom2);


VH.Boodschappenlijst.WebService.btnBoodschappenlijst_clickAjaxVB(ItemCode,
SucceededCallbackAddBoodschappenlijstje);
    
}

// This is the callback function invoked if the Web service
// succeeded.
// It accepts the result object as a parameter.
function SucceededCallbackAddBoodschappenlijstje(result, eventArgs)
{

var PopupIdBoodschap = VH.Boodschappenlijst.WebService.get_defaultUserContext();


//alert('waw' + PopupIdBoodschap)



  var hulpwaarden_array=PopupIdBoodschap.split("$");



if (result == '1') {
dopopup(hulpwaarden_array[0]);
}
else {
dopopup(hulpwaarden_array[1]);
}


// Page element to display feedback.
//var RsltElem = document.getElementById("ctl01_ResultId");
//RsltElem.innerHTML = result;
}


if (typeof(Sys) !== "undefined") Sys.Application.notifyScriptLoaded();
