I have an asp.net mvc website and am using javascript treemap control to display a heatmap. This control works great but i wanted to see if i can stick some other json fields into the callback that is used to update another div.
Does anyone know if this is possible. Right now I have to bounce back and forth and do 2 seperate ajax calls but i wanted to see if i can pass along this info along with the treemap json response.
What you would need to do is a single call in which you work out the callback yourself. Here the json would be a structure like
var data = {
heatmap_data: {}
other_data: {}
}
and next call
tm.loadJSON(data.heatmap_data);
to load the heatmap data and use all the other data to your own liking. That should do the trick right? At least, that is if loadJSON takes an object as seems to be the case. Still, this answer seems too simple, so I might be totally missing the point.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With