Hi

I am trying to send a ajax call to an action when ever there is a
change in selection.

<?php echo $form->create(''); ?>

                <?php echo $form->input('selected',array('label'=>'Select
Category','id'=>'selected','type'=>'select','options'=>$select));?>

                <?php echo $ajax->observeField('selected',
                                
array('with'=>'Form.Element.serialize(\'selected\')','url' =>
'display','update'=>'codes',
                                
'complete'=>"Effect.Appear('selected');",'onChange'=>true));?>

                <?php echo $form->end(); ?>

When I check the consle.

Form is not defined
http://localhost/index.php/codes/code
Line 46

new Form.Element.EventObserver('selected', function(element, value)
{new Ajax.Updater('codes','/index.php/codes/display',
{asynchronous:true, evalScripts:true, onComplete:function(request,
json) {Effect.Appear('selected');},
parameters:Form.Element.serialize('selected'), requestHeaders:['X-
Update', 'codes']})})


Any help !!!



Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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