All pastes #134712 Raw Edit

Stuff

public text v1 · immutable
#134712 ·published 2006-08-16 14:22 UTC
rendered paste body
1. js function that initiates the execution of the method on the server:
function DoSearch()
{
     var inputDataControl = document.getElementById("SomeControlId");
     HelloWorldService.HelloWorld(inputDataControl.value, OnRequestComplete);
}

2. method that is executed on the server (asynchronously) (could be a nornmal method, or a web service)
HelloWorldService.HelloWorld 
{
return x;
}

3. Another js function gets called after the server method ends, and it knows the result of the server method processing)
function OnRequestComplete(result)
{
     var controlDisplayingCallbackResult = document.getElementById("SomeOtherControlId");
     controlDisplayingCallbackResult.innerHTML = result;
}