Gusti
19 May 2011, 8:40 AM
Hi all.. I'm new to ExtJS, and currently i'm using Ext JS 3.0.
I'm using Ext.chart.LineChart to show graph data from date range.
This is my graph :
26145
I have problem when i tried to post parameters from view to my controller (php code). Here's the problem :
items:
new Ext.TabPanel({
activeTab:0,
defaults:{autoScroll: true},
items: [{
title : 'Graph Node 1',
items : [
new Ext.form.FormPanel({
id: 'date_range',
//name : 'date',
labelWidth: 100, // label settings here cascade unless overridden
frame:true,
bodyStyle:'padding:5px 5px 0',
//width: 350,
defaults: {width: 300},
defaultType: 'textfield',
items: [
new Ext.form.DateField({
fieldLabel: 'From',
width: 50,
id: 'date_range_from',
name: 'date_range_from',
value: new Date(),
format: 'd M Y',
readOnly: false,
maxValue: '<?php echo date("d M Y"); ?>'
}),
new Ext.form.TimeField({
fieldLabel: 'Pick time',
id: 'time_from',
name: 'time_from',
minValue : '09:00:00',
maxValue : '18:00:00',
increment : 1,
format : 'H:i:s'
}),
new Ext.form.DateField({
fieldLabel: 'To',
width: 50,
id: 'date_range_to',
name: 'date_rang_to',
value: new Date(),
format: 'd M Y',
readOnly: false,
name: 'date_range_to',
maxValue: '<?php echo date("d M Y"); ?>'
}),
new Ext.form.TimeField({
fieldLabel: 'Pick time',
id: 'time_to',
name: 'time_to',
minValue : '09:00:00',
maxValue : '18:00:00',
increment : 1,
format : 'H:i:s'
})
],
buttons: [{
text: 'Render',
type : 'submit',
url: 'desktop_charts.php',
method : 'POST',
handler: function() {
formPanel = Ext.getCmp('date_range');
formPanel.getForm().submit({
params: {date_range_from: 'date_range_from',
date_range_to :'date_range_to',
time_from : 'time_from',
time_to : 'time_to'}
});
}
}]
}),
new Ext.Panel({
iconCls:'chart',
title: 'X : Date and Time Received - Y : Temperature',
frame:true,
layout:'fit',
//autoScroll : true,
url: '../ext-3.0/resources/charts.swf',
items : new Ext.chart.LineChart({
//url: '../ext-3.0/resources/charts.swf',
autoLoad: false,
//autoLoad: {url: 'desktop_charts.php', scope: this},
store: date_store,
dataField: 'date_received',
xField: 'date_received',
yField: 'temperature',
yAxis: new Ext.chart.NumericAxis({
displayName: 'Temperature',
labelRenderer : Ext.util.Format.numberRenderer('00.00'),
majorUnit : 0.5
}),
tipRenderer : function(chart, record){
return Ext.util.Format.number(record.data.temperature, '00.00') + ' temperature in ' + record.data.date_received;
}
})
})
]
}
It is true when i tried to access my desktop_charts.php like this?
formPanel = Ext.getCmp('date_range');
formPanel.getForm().submit({ })
Because nothing was appear :((( and when i open my firebug this is the one that appear :
uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://localhost/TA/desktop_sms/ext-3.0/adapter/ext/ext-base.js :: i :: line 8" data: no]
Can anyone HELP me out of this????? :( please i'm so stuckk
Thanks for your kindda atention sorry if my english was bad
I'm using Ext.chart.LineChart to show graph data from date range.
This is my graph :
26145
I have problem when i tried to post parameters from view to my controller (php code). Here's the problem :
items:
new Ext.TabPanel({
activeTab:0,
defaults:{autoScroll: true},
items: [{
title : 'Graph Node 1',
items : [
new Ext.form.FormPanel({
id: 'date_range',
//name : 'date',
labelWidth: 100, // label settings here cascade unless overridden
frame:true,
bodyStyle:'padding:5px 5px 0',
//width: 350,
defaults: {width: 300},
defaultType: 'textfield',
items: [
new Ext.form.DateField({
fieldLabel: 'From',
width: 50,
id: 'date_range_from',
name: 'date_range_from',
value: new Date(),
format: 'd M Y',
readOnly: false,
maxValue: '<?php echo date("d M Y"); ?>'
}),
new Ext.form.TimeField({
fieldLabel: 'Pick time',
id: 'time_from',
name: 'time_from',
minValue : '09:00:00',
maxValue : '18:00:00',
increment : 1,
format : 'H:i:s'
}),
new Ext.form.DateField({
fieldLabel: 'To',
width: 50,
id: 'date_range_to',
name: 'date_rang_to',
value: new Date(),
format: 'd M Y',
readOnly: false,
name: 'date_range_to',
maxValue: '<?php echo date("d M Y"); ?>'
}),
new Ext.form.TimeField({
fieldLabel: 'Pick time',
id: 'time_to',
name: 'time_to',
minValue : '09:00:00',
maxValue : '18:00:00',
increment : 1,
format : 'H:i:s'
})
],
buttons: [{
text: 'Render',
type : 'submit',
url: 'desktop_charts.php',
method : 'POST',
handler: function() {
formPanel = Ext.getCmp('date_range');
formPanel.getForm().submit({
params: {date_range_from: 'date_range_from',
date_range_to :'date_range_to',
time_from : 'time_from',
time_to : 'time_to'}
});
}
}]
}),
new Ext.Panel({
iconCls:'chart',
title: 'X : Date and Time Received - Y : Temperature',
frame:true,
layout:'fit',
//autoScroll : true,
url: '../ext-3.0/resources/charts.swf',
items : new Ext.chart.LineChart({
//url: '../ext-3.0/resources/charts.swf',
autoLoad: false,
//autoLoad: {url: 'desktop_charts.php', scope: this},
store: date_store,
dataField: 'date_received',
xField: 'date_received',
yField: 'temperature',
yAxis: new Ext.chart.NumericAxis({
displayName: 'Temperature',
labelRenderer : Ext.util.Format.numberRenderer('00.00'),
majorUnit : 0.5
}),
tipRenderer : function(chart, record){
return Ext.util.Format.number(record.data.temperature, '00.00') + ' temperature in ' + record.data.date_received;
}
})
})
]
}
It is true when i tried to access my desktop_charts.php like this?
formPanel = Ext.getCmp('date_range');
formPanel.getForm().submit({ })
Because nothing was appear :((( and when i open my firebug this is the one that appear :
uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://localhost/TA/desktop_sms/ext-3.0/adapter/ext/ext-base.js :: i :: line 8" data: no]
Can anyone HELP me out of this????? :( please i'm so stuckk
Thanks for your kindda atention sorry if my english was bad