[eluser]Juicie[/eluser]
I have the following code:
Code:
function add_guestbook($data)
{
if($this->model->Add_guestbook_entry($data))
{
$message='<div class="notice">Message added successfully!</div>';
}
else
{
$message='<div class="error">Adding message failed!</div>';
}
$add_guestbook_response = new xajaxResponse();
$add_guestbook_response->assign("message_div", "innerHTML", $message);
$add_guestbook_response->assign("name", "value", "");
$add_guestbook_response->assign("email", "value", "");
$add_guestbook_response->assign("message", "value", "");
return $add_guestbook_response;
}
I've used XAJAX before and didn't encounter any problems. But for a new site i'm running into a problem. I have this code executed by a submit button. It get's the data from a form a puts the data into the database. That works fine. Now I wan't sen't a message back containing a confirmation or error message. And I want to empty the form whitout reloading the page. The last two parts don't work.
I'm seeing the following notice in the error log:
Severity: Notice --> Undefined index: query /usr/home/********/domains/******.**/public_html/website/system/libraries/xajax.php 907
Has it something to de with me using ob_start(); at the first codeignitor index.php file?
Can't find the solution, have searched this forum and XAJAX forum.
Regards