Welcome Guest, Not a member yet? Register   Sign In
AjaxFw (CJAX) not functionning
#12

[eluser]brizoo[/eluser]
Hi,

I'm sorry, I havn't forget to answer, I'm just in stand by because I'm working on something else for e while. I planed to answer to Ajaxboy and show an example on how I planed to use it.

I think this is not a problem, but more a misunderstanding of how works the framework.

For what I've understood, each time you want to make an ajax call you should place the call in your view and it should call a function in an ajax controller which is into the "Response" folder.

Until now, I was calling ajax directly in my views.

For example, have a look at this, it's one view that I'm using to handle error messages.
I have previously instanciated $ajax in my controller, which is a normal controller and not an ajax one. So I think there is the catch Wink

Code:
<?php defined('BASEPATH') OR exit('No direct script access allowed');

    $messages = $this->session->flashdata('message');
  
    if(isset($messages) and $messages != '')
    {
     if ( is_array($messages['text']))
     {
                foreach ($messages['text'] as $msg) {
      $ajax->warning($msg." Warning message...");
      //$this->firephp->warn($msg);
                }
     }
     else
     {
  $ajax->warning($messages['text']." Warning message...");
  //$this->firephp->warn($messages['text']);
     }

    }
?>

Am I wrong Ajaxboy ?

Thanks, and talk you soon, when I'll have more time.


Messages In This Thread
AjaxFw (CJAX) not functionning - by El Forum - 12-28-2012, 06:45 AM
AjaxFw (CJAX) not functionning - by El Forum - 12-28-2012, 06:58 AM
AjaxFw (CJAX) not functionning - by El Forum - 12-29-2012, 12:54 PM
AjaxFw (CJAX) not functionning - by El Forum - 12-31-2012, 02:29 AM
AjaxFw (CJAX) not functionning - by El Forum - 12-31-2012, 04:52 AM
AjaxFw (CJAX) not functionning - by El Forum - 01-01-2013, 11:36 PM
AjaxFw (CJAX) not functionning - by El Forum - 01-02-2013, 01:51 AM
AjaxFw (CJAX) not functionning - by El Forum - 01-02-2013, 03:09 AM
AjaxFw (CJAX) not functionning - by El Forum - 01-02-2013, 03:35 AM
AjaxFw (CJAX) not functionning - by El Forum - 01-02-2013, 07:11 AM
AjaxFw (CJAX) not functionning - by El Forum - 01-09-2013, 07:28 AM
AjaxFw (CJAX) not functionning - by El Forum - 01-09-2013, 11:30 AM
AjaxFw (CJAX) not functionning - by El Forum - 01-09-2013, 11:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB