Topic: Error in "return $objResponse;"

My Code:

function ajaxValidate($form) {
            $objResponse = new xajaxResponse();
            $name = $form['name'];
            $tel = $form['tel'];

            $query = mysql_query("INSERT... ETC...");
$objResponse->alert('Succefull');
}

The INSERT are OK, but in CONSOLE of browser return:

<!DOCTYPE html lang="pt" xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt"><?xml version="1.0" encoding="utf-8" ?><xjx><cmd cmd="al">SSuccefull</cmd></xjx>

And the error:     (X) uncaught exception: [object Object]

Help me pls. Sry for my english.

Re: Error in "return $objResponse;"

function ajaxValidate($form) {
            $objResponse = new xajaxResponse();
            $name = $form['name'];
            $tel = $form['tel'];

            $query = mysql_query("INSERT... ETC...");
$objResponse->alert('Succefull');
return $objResponse;
}

Re: Error in "return $objResponse;"

Are you using php 5.3? I believe xajax 0.6 is targeted to it.

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.