Hi, I'm trying to create a form were a select input calls Ajax.Update onChange. I'm starting to get frustrated since my ajax function seems to be completely dead, nothing happens onChange.
Here are some snippets of my code: --------------index.thtml-------------- <?php echo $form->create('User', array('action' => '/addPurchase')); echo $form->input('Purchase/group_id', array('label' => 'Select group: ', 'onchange' => "new Ajax.Updater('checkboxes', '/users/ updatecheckboxes/', {asynchronous:true, evalScripts:true});", 'empty' => false));?> <div id="checkboxes"> <?php foreach ($groupmembers as $member){ echo $form->input('checkbox'.$member['id'], array( 'label' => $member['username'], 'type' => 'checkbox', 'empty' => false)); }?> </div> <?php echo $form->Submit('Submit',array('div'=>false,'id'=>"button")); echo $form->end(Null); --------------end of index.thtml-------------- --------------users_controller.php-------------- ... var $helpers = array('Form','Ajax','Javascript','Html'); ... function updatecheckboxes(){ $myGroup = $this->User->Group->findById('2'); $this->set('groupmembers', $myGroup['User']); $this->render('checkboxes','ajax'); } ... --------------end of users_controller.php-------------- --------------checkboxes.thtml-------------- <?php foreach ($groupmembers as $member){ echo $form->input('checkbox'.$member['id'], array( 'label' => $member['username'].'1', 'type' => 'checkbox', 'empty' => false)); echo 'hello'; }?> --------------end of checkboxes.thtml-------------- My page head looks like this: <head> <script src="javascripts/prototype.js" type="text/javascript"></ script> <script src="javascripts/scriptaculous.js" type="text/javascript"></ script> <title>Users</title> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <link rel="stylesheet" type="text/css" href="/cakeMoney/css/ cake.default.css" /> </head> I'm starting to give up, I simply cant see what I'm doing wrong. Please help. Thanks -Dan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---