my code
ho w to assign data-percent value dynamically with using jquery and Ajax calls.
i am write one web method. in my method take arguments and return value, how to assign the return value to data-percentage.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suraj SahooPosted Mar 9, 2015, 8:11 AM
I think using the dynamic variable which has the data percentage can be used directly in the ajax success. Like FireFox[name, dynamicVariable]
Hope this works
VEERENDRA kUMARPosted Mar 9, 2015, 6:34 AM
i am using same way.
i want how to bind the value for data-percentage.
i am calling web method through ajax call. i get result. now how to bind.
Suraj SahooPosted Mar 9, 2015, 6:17 AM
$(document).ready(function () {
$.ajax(function(){
url:"URL TO GET THE VALUE %",
type:"GET",
success: function(data) { //Return the list of %age values and assign like below
RenderPieChart('container', [
['Firefox', data[0]],
['IE', data[1]],
['Chrome', data[2]]
]);
}
});
I hope this helps.
Accept if helps anyway.
Thanks