views:

39

answers:

1

This is my code to trigger the ajax..

<td>[url=”#”]load->library(‘ajax’);

$this->ajax->link_to_remote($row->project_name, array(‘url’ => ‘index.php/admin_cont/ajaxtake’, ‘update’ => ‘data_div’));

?>”

style=“text-decoration:none”><?php echo substr($row->project_name,0,11).”..”; ?> [/url]</td>

here “admin_con” is my controller page and ajaxtake is function in “admin_con” which display a message “hi”.

data_div the the place where i want to show the result..

but it is not working.. somebody please help me

Thanks in advance..

Tismon

A: 

The path in your URL seems to be wrong :

index.php/admin_cont/ajaxtake

Since your controller name is admin_con, shouldn't the URL be

index.php/admin_con/ajaxtake

I'd advise debugging this in Firebug for Firefox or through the Google Chrome Javascript Console. These tools are great for trying to track down AJAX problems.

Stephen Curran