It's not that easy, the only way is to make a post and send the variables.
What I normally do is to have a handler to do the job for me and using jQuery I get a nice pretty effect...
from your javascript code
var r = '';
for (var i = 0; i < elements.length; i++)
r += elements[i] + ',';
// send this asynchronously to the handler
$.get("myHandler.asmx", { values: r }, function(data) {
// it finished processing, let use the passed data
alert(data);
});
in your handler
public void ProcessRequest(HttpContext context)
{
string r = context.Request["values"];
// process them
context.Response.ContentType = "text/plain";
context.Response.Write("OK");
}
that "OK" will be passed to the data variable, and you can interact your user with a much more rich environment.