This example calls the noParam function which
invokes a server-side JSON call that then calls a handler
back in the browser.
The client-side JavaScript for looks like:
<script>
// <![CDATA[
function callNoParam() {
noParam("noParamCallback");
}
function noParamCallback() {
alert("the server called me back... woo hoo!");
}
// ]]>
</script>
Let's send the contents of a test field and process it:
The Script to do this is:
<script>
// <![CDATA[
function stringSender() {
var q = jQuery("#myField")[0];
var v = q.value;
oneString("stringCallback", v);
}
function stringCallback(what) {
jQuery("#dest")[0].innerHTML = "The server said: "+what;
}
// ]]>
</script>
Let's send some numbers to the server and have the server
add 1 to each of the numbers.
Enter comma separated numbers: