问题描述:

I'm working on some internal bugtracking system. For workflow purposes i want to change status of every bug without need of reloading whole page. So i decided to try with AJAX - something new for me.

Now i'm after several hours of trying with one effect - there's still new page loading.

What i have in my index.ctp (it's where i want to create links to change bug statuses)

In foreach loop (for every bug state i can have excluding current one) i'm using this:

echo $this->Js->link(

$stateName,

array( 'controller' => 'bugs', 'action' => 'updateState', $bug['Bug']['id'], $stateId),

array( 'update' => '#wynik')

);

It's working just like $this->Html->link (exactly same way - redirecting to updateState function in controller. It's refreshing the page, now working 'live'.

update parameter #wynik is just temporary i've created for testing purposes.

What i'm doing wrong? I'm pretty sure jQuery is downloaded and loaded by the page, but i don't know how to check it.

I'm using CakePHP 2.3

相关阅读:
Top