Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8798715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:09:24+00:00 2026-06-14T00:09:24+00:00

I have a simple perl cgi that i use in my extjs project, written

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:09:25+00:00Added an answer on June 14, 2026 at 12:09 am

    I don’t know where your data is coming from, but you can do something like this:

    use strict;
    use warnings;
    use CGI;
    use JSON;
    
    my $q = CGI->new;
    print $q->header("application/json");
    
    my $Sev_Logged = $q->param('Sev_Logged');
    
    my $data = [
      {
        "Week" => 1145,
        "Sev_Logged" =>"3_major",
      },
      {
        "Week" => 1146,
        "Sev_Logged" => "4_minor",
      },
    ];
    
    my $node_hash = {
      data => [
        grep { $_->{'Sev_Logged'} eq $Sev_Logged } @$data,
      ]
    };
    print to_json($node_hash);
    

    You can call it like this: GET script.pl?Sev_Logged=3_major


    Anyway, 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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have something like: #!/usr/bin/perl use strict; use warnings; use CGI::Simple; use DBI; my
I currently have a Perl CGI script that parses incoming XML requests using XML::Simple
I am using the following script: #!/usr/local/bin/perl -wT use strict; use warnings; print Content-type:
I have this simple perl daemon: #!/usr/bin/perl use strict; use warnings; use Proc::Daemon; Proc::Daemon::Init;
Good Day, I have a simple working routine in Perl that swaps two words:
I have learned Perl and PHP.So I want to do simple real time project
I have simple Perl/CGI scripts based web server which is mainly used to display
I have a very simple perl script that moves files (don't ask why i
I have a quite simple perl script, that in one function does the following:
I have written a Perl script that runs as a daily crontab job that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.