Topic: 9 out of range 3

Hi, I'm trying to use xajax on a web application that gets reports from Google Analytics, and I keep getting a strange error that says "9 out of range 3". I have no idea why I am getting this error, but I've traced it back to xajax.

Here is the response as indicated in Firebug:

<!DOCTYPE html>
<html>
<?xml version="1.0" encoding="utf-8" ?><xjx><cmd cmd="as" id="results" prop="innerHTML"><![CDATA[S<a href="file.csv"><p>Download Report (CSV)</p></a>]]></cmd></xjx>

Here are the relevant portions of code:

require_once('includes/xajax/xajax_core/xajax.inc.php');

$xajax = new xajax();

$xajax->registerFunction("generateReport");
$xajax->registerFunction("exportResults");

$xajax->processRequest();

function exportResults(&$results) {
    $objResponse = new xajaxResponse();
    
    if (count($results->getRows()) > 0) {
        $rows = $results->getRows();
        $fp = fopen('file.csv', 'w');
        foreach ($rows as $r) {
            fputcsv($fp, $r);
        }
        fclose($fp);
        
        $objResponse->assign("results","innerHTML",'<a href="file.csv"><p>Download Report (CSV)</p></a>');
    } else {
        $objResponse->assign("results","innerHTML",'<p>No results found.</p>');
    }
    return $objResponse;
}
?>

<head>
<meta charset="UTF-8"></meta>
<?php $xajax->printJavascript(); ?>
<script type="text/javascript">    
    function generateReport() {
        ...
        xajax_generateReport(accountId, startDate, endDate);
    }
</script>
</head>

<input type="button" value="Generate Report" onclick="generateReport()" />
<div id="results" name="results"></div>