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>
<?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:


$xajax = new xajax();



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);
        $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;

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

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