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

  • Home
  • SEARCH
  • 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 331249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:45:25+00:00 2026-05-12T09:45:25+00:00

Here is client Side code: jQuery(document).ready(function(){ jQuery(#list).jqGrid({ url:’example.php’, datatype: ‘xml’, mtype: ‘GET’, colNames:[‘Inv No’,’Date’,

  • 0

Here is client Side code:

jQuery(document).ready(function(){
  jQuery("#list").jqGrid({
    url:'example.php',
    datatype: 'xml',
    mtype: 'GET',
    colNames:['Inv No','Date', 'Amount','Tax','Total','Notes'],
    colModel :[ 
      {name:'invid', index:'invid', width:55}, 
      {name:'invdate', index:'invdate', width:90}, 
      {name:'amount', index:'amount', width:80, align:'right'}, 
      {name:'tax', index:'tax', width:80, align:'right'}, 
      {name:'total', index:'total', width:80, align:'right'}, 
      {name:'note', index:'note', width:150, sortable:false} ],
  });
});

Here is example.php code:

<?php 

header("Content-type: text/xml;charset=utf-8");
print "<?xml version='1.0' encoding='utf-8'?>";
print "<rows>";
print "<page>1</page>";
print "<total>1</total>";
print "<records>1</records>";

print "<row>";
print "<cell>0</cell>";
print "<cell>08-01-03</cell>";
print "<cell>2</cell>";
print "<cell>4</cell>";
print "<cell>12</cell>";
print "<cell><![CDATA[Aiutooooooooo]]></cell>";
print "</row>";
print "</rows>"; 
?>

Till now everything is just fine, but if now I try to get xml data from my perl cgi script
it won’t work, and data is not displayed.

Here is the perl code:

#!/usr/bin/perl

use CGI;

print CGI->header("Content-type: text/xml;charset=utf-8");
print "<?xml version='1.0' encoding='utf-8'?>";
print "<rows>";
print "<page>1</page>";
print "<total>1</total>";
print "<records>1</records>";

print "<row>";
print "<cell>0</cell>";
print "<cell>08-01-03</cell>";
print "<cell>2</cell>";
print "<cell>4</cell>";
print "<cell>12</cell>";
print "<cell><![CDATA[Aiutooooooooo]]></cell>";
print "</row>";
print "</rows>"; 

and in the jqGrid code I put on url = ‘cgi-bin/example.pl’,

As you can notice the perl and php codes are similar but don’t do the same thing why ?

If you got any hints on how to debug this, please forward.
Thanks,

  • 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-05-12T09:45:25+00:00Added an answer on May 12, 2026 at 9:45 am

    A couple of suggestions:

    #1: In your jQuery code you have this:

    url:'example.php'
    

    but then you say that for your Perl code you change it to this:

    url = 'cgi-bin/example.pl'
    

    Is that right, that one has a cgi-bin/ prefix and the other doesn’t?

    #2: What happens if you simply point your browser at the URL of your Perl script? Does it show the XML? What I’m wondering is whether your web server is correctly configured to run PHP, but not correctly configured to run Perl.

    Edit – #3: The way you’re using Perl’s CGI module looks odd to me (though I’m not a Perl guy). I think this is the more idiomatic use:

    use CGI;
    my $cgi = new CGI;
    print $cgi->header("Content-type: text/xml;charset=utf-8");
    

    Does that help?

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

Sidebar

Ask A Question

Stats

  • Questions 231k
  • Answers 231k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use the following function like this: Image('/path/to/original.image', '1/1', '150*', './thumb.jpg');… May 13, 2026 at 2:13 am
  • Editorial Team
    Editorial Team added an answer Check you database schema to see if the field (referenced… May 13, 2026 at 2:13 am
  • Editorial Team
    Editorial Team added an answer I figured out the problem - there was a session… May 13, 2026 at 2:13 am

Related Questions

Here is client Side code: jQuery(document).ready(function(){ jQuery(#list).jqGrid({ url:'example.php', datatype: 'xml', mtype: 'GET', colNames:['Inv No','Date',
I am trying to put some jquery UI code into an existing asp.net app,
I need to find a way to call a vb.net function in my aspx
I am trying to tap into the HTML.ValidationMessage() element to write so really custom
I'd like to change the value of the onclick attribute on an anchor. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.