Loading XML using Perl and get method

Greetings:
I am developing a page with two components: Toolbar and Grid.

The toolbar has a menu with 3 submenus:

  1. Activity in the last 24 hours
  2. 48 hours
  3. 72 hours

All of these options load XML to a grid. The XML is generated via a server side Perl code.
After all the correct initialization I load the grid like this:

myInProgressGrid.loadXML("/cgi-bin/dashformat.pl");

And results are loaded without a problem. But if I want to pass a parameter on the load XML function then the grid is blank, this is the call used:

myInProgressGrid.loadXML("/cgi-bin/dashformat.pl?time=48hours");

Some aspects to consider:

  1. If I enter the URL /cgi-bin/dashformat.pl?time=48hours on the browser, I obtain the right XML needed, so this discards a possible problem with the script.

  2. The definition myInProgressGrid.loadXML("/cgi-bin/dashformat.pl?time=48hours"); properly loads the grid if I load the page using Safari, FireFox, Chrome or Opera - but it neither works on IE 7 nor IE 8.

  3. I tried also these options:
    myInProgressGrid.load("/cgi-bin/dashformat.pl?time=48hours");
    myInProgressGrid.load("/cgi-bin/dashformat.pl?time="+mytime); (using variable mytime=48hours)
    myInProgressGrid.load(mytime); (using variable mytime=("/cgi-bin/dashformat.pl?time=48hours")

I am totally lost, is there any tip, is it a problem of MSIE? I would hate to have 3 scripts in the server side just to show three different options. As we plan to have overview by Week, Month, Year, this will add more server side scripts that can all be handled in a single one with a parameter.

Many thanks for your help.
Claudio

  1. The definition myInProgressGrid.loadXML("/cgi-bin/dashformat.pl?time=48hours"); properly loads the grid if I load the page using Safari, FireFox, Chrome or Opera - but it neither works on IE 7 nor IE 8.

What does happen in Opera? Try to open “/cgi-bin/dashformat.pl?time=48hours” url in Opera and check if your xml is properly-formed.

The entire implementation works perfect in all browsers including Opera but not in IE7 or 8.
If you want I can give you the code.

What issue happens in IE? If it “Incorrect XML” error you can find reasons of this error here
docs.dhtmlx.com/doku.php?id=dhtm … orrect_xml
docs.dhtmlx.com/doku.php?id=othe … mon_errors
(IE specific) Usage of incorrect content type - if you are using dynamic XML source (generate it by the script), you need to send the data with Content-type:text/xml;

Hi Olga:
Let me better explain the issue. The Grid loads and displays perfectly the XML on all browsers except MSIE 7 and 8. The XML is properly formatted otherwise the grid would reject it. The XML also looks perfect if I request it via MSIE.

So this is the way I load the grid:
myInProgressGrid.load("/cgi-bin/dashformat.pl");

This works well in ALL browsers including MSIE 7 and 8

But if want to load the grid by passing a parameter (which just creates a reduced list of records from the DB) then it does not work:
myInProgressGrid.load("/cgi-bin/dashformat.pl?time=86400");

This is the XML output as shown in MSIE when I run this URL:
server/cgi-bin/dashformat.pl?time=86400

<?xml version="1.0" encoding="UTF-8" ?>
  • 31 May 2010 03:44:14 PSEB > AutoCAD > Ironman > px86 F015.acad.swl Transferred Transferred Transferred Transferred
  • 31 May 2010 04:04:58 PSEB > AutoCAD > Ironman > px86 F015.acad.swl Transferred Transferred Transferred Transferred
  • 31 May 2010 10:17:50 PSEB > AutoCAD > Ironman > px86 F015.acad.swl Transferred Transferred Transferred Transferred

But if I add the content-type: text/xml then I get the error Invalid XML.

Please help
Claudio
PS: I can send the whole dhtmlxgrid implementation if you wish.

Please provide us code snipped of grid initialization and example of problematic xml