I have a simple perl cgi that i use in my extjs project, written like this :
use JSON;
print "Content-type: application/json\n\n";
my $node_hash = {
data => [{
"Week",1145,
"Sev_Logged", "3_major"
},{
"Week", 1146,
"Sev_Logged", "4_minor"
}]};
print to_json($node_hash);
Which returns data written in json format that i use to generate a chart.
I also have a form which contains a combobox with values : “3_major” and “4_minor” corresponding to the “Sev_Logged” field.
Now what i want is, whenever the user chooses “4_minor”, my perl cgi will only return week 1146, thus my chart will only contain data of week 1146.
Is this possible? How?
Thank you
I don’t know where your data is coming from, but you can do something like this:
You can call it like this:
GET script.pl?Sev_Logged=3_majorAnyway, I think if you already transmitted all the data, you should filter it on the client side using JavaScript only. There is no AJAX call necessary in my opinion.