Common Custom tasks
Common_CustomTasks_CSharp\PostBackTask_CSharp\Resources\JavaScript\CustomSendRequest.js
 Copyright 2011 ESRI
 
 All rights reserved under the copyright laws of the United States
 and applicable international laws, treaties, and conventions.
 
 You may freely redistribute and use this sample code, with or
 without modification, provided you include the original copyright
 notice and use restrictions.
 
 See <a href="http://resourcesbeta.arcgis.com/en/help/arcobjects-net/usagerestrictions.htm">the use restrictions</a>.
 


function sendRequest(callbackArguments, callbackFunctionString)
{
    // Construct a string containing the callback arguments
    var argument = 'EventArg=customRequest';
    if (callbackArguments.length > 0) 
        argument = String.format('{0}&{1}', argument, callbackArguments);
    // Set the callback's contents
  var context = 'CustomCallback';
  // Initiate the callback
  eval(callbackFunctionString);
}