The "complete" option works fine if I put the javascript directly into
the array. However if I try to put it in a function in the array it
doesn't work. Take the following example:

<?
echo $ajax->form('addComment', 'post', array(
        'model' => 'Comment',
        'url' => array('controller' => 'comments', 'action' =>'add'),
        'update' => 'pureGenius',
        'complete' => 'testCall();'));
?>

<script type='javascript'>
function testCall()
{
    alert('[EMAIL PROTECTED]');
}
</script>

If I put the alert in the ajax array, it works fine. Doesn't work as
it stands. Any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to