Jun 18, 2014, 4:51 PM
[CLOSED] [#511] Resource manager addscript in IE
Hi Danil,
I calling a DirectMethod when i click on a button and inside of the DirectMethod the code has been written that is for showing up the google visualizer chart
this.callParent(arguments);},hasId:function(){retu rn!!(this.initialConfig&&this.initialConfig.id);}, isNonContentable:function(){return this.isXType("tablepanel")||this.isXType("dataview ")||this.isXType("field")||this.isXType("draw")||t his.isXType("chart")||this.isXType("button");},des troyContentWidgets:function(checkFlag){if((this.de stroyContent||!checkFlag)&&!this.isNonContentable( )){var contentEl=this.getContentTarget();if(contentEl&&co ntentEl.dom){this.destroyFromDom(contentEl.dom);}} },beforeDestroy:function(){this.destroyContentWidg ets(true);},destroyFromDom:function(dom){if(!dom){ return;}
var children=dom.children,child,cmp,id,len,i;for(i=0,l en=children.length;i<len;i++){child=children[i];if(child){id=child.id;if(!Ext.isEmpty(id))
Unable to get property 'length' of undefined or null reference
{cmp=Ext.getCmp(id);if(cmp){cmp.destroyContent=tru e;if(!cmp.isDescendantOf(this)){cmp.destroy();}
,However working fine in rest of the browser...
My sample code as below :
Thanks in Advance.
I calling a DirectMethod when i click on a button and inside of the DirectMethod the code has been written that is for showing up the google visualizer chart
ResourceManager1.AddScript("var data = google.visualization.arrayToDataTable([ ['Label', 'Value'], ['% to Test', " + percentage + "] ]); drawVisualization('" + percentage + "', data);")
Chart being loaded fine while page load and it is resulting an error when we call the Addscript in direct method as per the selected parameters from the drop down The error from IE debugger from (webresource.axd) asthis.callParent(arguments);},hasId:function(){retu rn!!(this.initialConfig&&this.initialConfig.id);}, isNonContentable:function(){return this.isXType("tablepanel")||this.isXType("dataview ")||this.isXType("field")||this.isXType("draw")||t his.isXType("chart")||this.isXType("button");},des troyContentWidgets:function(checkFlag){if((this.de stroyContent||!checkFlag)&&!this.isNonContentable( )){var contentEl=this.getContentTarget();if(contentEl&&co ntentEl.dom){this.destroyFromDom(contentEl.dom);}} },beforeDestroy:function(){this.destroyContentWidg ets(true);},destroyFromDom:function(dom){if(!dom){ return;}
var children=dom.children,child,cmp,id,len,i;for(i=0,l en=children.length;i<len;i++){child=children[i];if(child){id=child.id;if(!Ext.isEmpty(id))
Unable to get property 'length' of undefined or null reference
{cmp=Ext.getCmp(id);if(cmp){cmp.destroyContent=tru e;if(!cmp.isDescendantOf(this)){cmp.destroy();}
,However working fine in rest of the browser...
My sample code as below :
<script>
var LoadChart = function () {
var year=2014;
var month=4;
var week = 3;
App.direct.ShowChart(year, month, week)
google.load('visualization', '1', { packages: ['gauge'] });
function drawVisualization(percent, data1233) {
var options111 = {
width: 180, height: 180,
redFrom: 0, redTo: 49,
yellowFrom: 50, yellowTo: 89,
greenFrom: 90, greenTo: 100,
animation: {
duration: 1000,
easing: 'out'
}
};
// Create and draw the visualization.
new google.visualization.Gauge(document.getElementById('visualization')).
draw(data1233, options111);
}
</script>
<ext:Panel Region="Center" runat="server" ID="pnlChart" Border="false" StyleSpec="text-align:center; ">
<Content>
<div id="divInfo" runat="server" style="font-family: sans-serif; font-size: 11px;
padding: 10px 0 0 0">
</div>
<div id="parentDiv" align="center" style="width: auto; border: 0px solid gray;">
<div runat="server" id="visualization" align="center" style="width: 170px; vertical-align: middle;
height: 180px; border: 0px solid gray;">
</div>
</div>
</Content>
</ext:Panel>
<ext:Button runat="server" ID="btnViewChart" Text="View Chart">
<Listeners>
<Click Fn="LoadChart" />
</Listeners>
</ext:Button>
Thanks in Advance.
Last edited by Daniil; Jun 23, 2014 at 8:39 AM.
Reason: [CLOSED]