Welcome Guest, Not a member yet? Register   Sign In
Ajax Framework (CJAX) for Codeigniter 2.x+
#51

[eluser]XatroX[/eluser]
[quote author="Ajaxboy" date="1340366974"]Okay thanks,

AJAX_VIEW Constant allows you to view the response on the browser, if AJAX_VIEW is not defined, for security reasons it will not show the response on the browser, so 'AJAX_VIEW' is optional, Though in this package comes as 'on' by default, but there is a small typo on the definition.

In file ajax.php line 34,

change:

defined('AJAX_VIEW', 1);

to:

define('AJAX_VIEW', 1);

(remove the extra d),

This is a typo/ bug. Please change it, it will come as changed by next release.

-cj[/quote]

ok, , ,thanks dude Big Grin
#52

[eluser]XatroX[/eluser]
Code:
<?php echo $this->session->flashdata('message'); ?>
<?php echo validation_errors(); ?>
<?php
$ajax = ajax();
$ajax->call("http://google.co.id/ ","container-transaksi");
$ajax->init();
?>

<fieldset>
<legend>Transaksi Penjualan</legend>

<div id='container-transaksi'>
  <p>
   &lt;input type='submit' value='Pembeli Baru' /&gt;
   &lt;input type='submit' value='Pembeli Lama' /&gt;
  </p>
</div>

</fieldset>

I use that script on my view, but nothing happen.
Did i make any mistakes??

*sorry if i repeat asking to you, i still newbie in CI and this plugins
#53

[eluser]Ajaxboy[/eluser]
You are using $ajax->init(); wrong. You'd need to echo the init() function within the head tag.

please see:

http://cjax.sourceforge.net/docs/Iniciat...Engine.php
#54

[eluser]XatroX[/eluser]
[quote author="Ajaxboy" date="1340375353"]You are using $ajax->init(); wrong. You'd need to echo the init() function within the head tag.

please see:

http://cjax.sourceforge.net/docs/Iniciat...Engine.php[/quote]
thanks again dude..this framework are very helpfull for me Smile
#55

[eluser]XatroX[/eluser]
Code:
&lt;?php
$ajax = ajax();
$ajax->Exec("baru",$ajax->call("http://google.co.id/ ","container-transaksi"));
$ajax->init(site_url());
?&gt;

<fieldset>
<legend>Transaksi Penjualan</legend>

<div id='container-transaksi'>
  <p>
   &lt;input id='baru' type='submit' value='Pembeli Baru' /&gt;
   &lt;input type='submit' value='Pembeli Lama' /&gt;
  </p>
</div>

</fieldset>

I get the problem again.
I use that code, but if i click the button, nothing happen
#56

[eluser]Ajaxboy[/eluser]
within your html head tag you have to do:

Code:
&lt;head&gt;
&lt;?php echo $ajax->init(); ?&gt;
&lt;/head&gt;

As it is stated in the docs.

You are not echoing it.

Instead of:

Code:
$ajax->init();

do:

Code:
echo $ajax->init();
#57

[eluser]Ajaxboy[/eluser]
You might want to download the samples so that you can mimic the code used:

http://sourceforge.net/projects/cjax/files/Demos/
#58

[eluser]fliu[/eluser]
hi ajaxboy,

i tried to install the framework, but getting following error

************
Message: Undefined property: empty_controller_test::$load

Filename: response/test.php

Line Number: 8
**********

please help me out, thank you.

Frank
#59

[eluser]Ajaxboy[/eluser]
Hello fliu,

What version of php are using? and also, what url are using testing it against?
#60

[eluser]fliu[/eluser]
php 5.3.8
testing it on my local environment by http://localhost/project/ajax.php?test/test

thanks

Frank




Theme © iAndrew 2016 - Forum software by © MyBB