Thanks, well I figure out what was the problem. Before CJS i was using
Cajax component now I switch to CJS.
In some view that containing a form, I use a $page->submit and also a
button to cancel the operation :
echo $page->submit('Recompute', array('url' =>
'/Requests/compute/1/'.$lastpos, 'update' =>
'request_space', 'class' => 'inputSubmit')); ?>
<php echo '<input type="button" value="Cancel" class="inputSubmit"
onclick="'.
$ajax->remoteFunction( array('url' =>
'/Requests/viewdata/'.$lastpos,
'update' =>
'request_space')).'">'; ?>
This was the problem, the 2 above can't work and send me plenty of
warning. If I use the $page->remote_function instead of $ajax in this
case, the page display ok for 1 seconde and then execute the remote
function by itlsef without clicking.
I did find the solution by replacing the $page->submit by $ajax->submit
and that seems ok.
Actuallt maybe I am wrong to use box Ajax and Page helper in the
application. I need often to update complete div using $ajax->div('xx')
and divEnd. Of course the big advantage of CJS is to be able to update
div's even without having specified an 'udpate' => 'div' first ..
I am on it, not an easy job to upgrade but nearly there. I think I need
to define a set of "rules" for the combined usage of $ajax and $page.
Thanks, anyway you do a great job. :-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---