Hello everyone,
I'm trying to get an ajax form working on my site, and I'm having a
strange issue. The div set to update updates fine and displays the
view file it's supposed to, but in my controller, $this->data is
empty.
Here are the relevant sections:
<---------------- INDEX.CTP ---------------------->
<?= $javascript->link(array('prototype', 'scriptaculous')); ?>
<?php echo $ajax->form('/bda_classes/search','post', array('url'=>'/
bda_classes/search','update'=>'results'));?>
<?php echo $form->input('BdaClass.keyword',array('label'=>'')); ?
>
.
.
.
<?php echo $form->submit("Search"); ?>
<?php echo $form->end(); ?>
<---------------- END OF INDEX.CTP ---------------------->
<---------------- bda_classes_controller ---------------------->
var $helpers = array('Html', 'Form', 'Ajax', 'Javascript');
var $components = array( 'RequestHandler');
function search(){
debug($this->data);
$this->render('search', 'ajax');
}
<----------------END bda_classes_controller ---------------------->
When I submit the form, it updates the div with :
app/controllers/bda_classes_controller.php (line 286)
I know this should be easy, I've done it before on other sites. But
after a couple hours of banging my head against a wall, I can't figure
out what the problem could be. Any help would be much appreciated!
Thanks!
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