Dialog with Dynamic AJAX Data

Dialog with Dynamic AJAX Data

I am creating a dialog using jQuery, and want to populate it with dynamic data. The data in question is properly formatted XML (parsed using jQuery). The call I make looks something like this:

  1. function getXML() {
       
            var $link = $(this);
            var $dialog = $('<div></div>')
                .load('xml_results_formatted_jquery.php' + ' #dialogcontent')
                .dialog({
                    modal: true,
                    autoOpen: false,
                    title: 'Matching Vehicles Found',
                    width: 850,
                    height: 300
                });
     
            $dialog.dialog('open');
    }














Now, the xml_results_formatted_jquery.php page obviously contains a DIV with ID dialogcontent. This page in turn calls a pure PHP page which queries a webservice and creates XML output.

If I preview the xml_results_formatted_jquery.php file, I see the data so I know the webservice is being queried correctly. However, when I call my function above, the dialog box created has no text in it (apart from the text already present in the dialogcontent DIV). The bit that shows the results of the XML parse is empty.

It is almost as if the file isn't being properly generated at runtime.

Any ideas??

Si