I try to pop up div on button click . In that div i also display high chart and div display on page but now i want to display div on pop up when user click on button.
This is what i try for div pop up but div pop up not display
<script type="text/javascript">
var strarr = "[['DDSB', 39], ['DPSB', 9], ['DSB', 26], ['MV', 35], ['PSB', 52]]";
$(function () {
$('[ID*=search_data]').on('click', function () {
var from = $('[ID*=fromdate]').val();
var to = $('[ID*=todate]').val();
var reg = $('[ID*=regiondrop] option:selected')[0].value;
var obj = {};
obj.fdate = from;
obj.tdate = to;
obj.region = reg;
Getdata(obj);
return false;
});
});
function Getdata(obj) {
$.ajax({
type: "POST",
url: "WebForm1.aspx/GetVo",
data: JSON.stringify(obj),
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
cache: false,
success: function (result) {
alert(result.d);
strarr = result.d;
var myarr = strarr;
Drewchart(myarr);
},
error: function (error) {
alert("error");
}
});
}
function Drewchart(result) {
$('#container').highcharts({
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45
}
},
title: {
text: 'Contents of Charts'
},
subtitle: {
text: '3D donut in Highcharts'
},
plotOptions: {
pie: {
innerSize: 100,
depth: 45
}
},
series: [{
name: 'Delivered amount',
data: result
}]
});
}
$('[ID*=search_data]').on('click', function () {
$('#container').dialog('open');
});
when i click button nothing happens
any solution?