Reputation: 538
I am using google visualization API java wrapper to create a reporting module. I am using image charts.
Now I want to pass the url of the generated chart to a servelet. I can get the url of the generated graph using getImageUrl()
method. I have stored the value of that url in a javascript variable.
How can I pass the URL through ajax?
Upvotes: 0
Views: 1393
Reputation: 7631
Pass it as one of the parameters in $.ajax(); or $.post(); if you are using jquery. just as you would pass any other data in an Ajax call. An example would be:
$.ajax({
type: "POST",
url: urlToCall,
data: { 'param': valueOfParam },
});
Pass it as param is passed above.
Upvotes: 2