Created
July 13, 2011 04:09
-
-
Save fmpwizard/1079706 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Build a JavaScript function that will perform an AJAX call based on a value calculated in JavaScript | |
* | |
* @param jsCalcValue the JavaScript that will be executed on the client to calculate the value to be sent to the server | |
* @param func the function to call when the data is sent | |
* | |
* @return the function ID and JavaScript that makes the call | |
*/ | |
def ajaxCall(jsCalcValue: JsExp, func: String => JsCmd): (String, JsExp) = ajaxCall_*(jsCalcValue, SFuncHolder(func)) | |
/** | |
* Build a JavaScript function that will perform an AJAX call based on a value calculated in JavaScript | |
* | |
* @param jsCalcValue the JavaScript that will be executed on the client to calculate the value to be sent to the server | |
* @param jsContext the context instance that defines JavaScript to be executed on call success or failure | |
* @param func the function to call when the data is sent | |
* | |
* @return the function ID and JavaScript that makes the call | |
*/ | |
def ajaxCall(jsCalcValue: JsExp, jsContext: JsContext, func: String => JsCmd): (String, JsExp) = | |
ajaxCall_*(jsCalcValue, jsContext, SFuncHolder(func)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment