Has anyone has a working example on using ajax helper to update text field
when we observe drop down list ?
I follow ajax helper on
http://www.croyantdebridiers.com/CakePHP_AJAX_selectbox_demo/ajaxcombobox/users/add
to update drop down list  and it worked fine for me. 
But, when I tried to modify  a code a little bit to update text field, I
found it didn't work.
Here's what I have:
<?
        echo $form->create('');
echo
$form->select('document_type_id',array($docTypes),null,array('id'=>'document'),true);
     
                
        echo $form->input('document_number', array('id'=>'docnum'));
        
        echo
$ajax->observeField('document',array('url'=>'populate_document_select','update'=>'docnum'));
        echo $form->end('Save');

?>

I'm trying to pass value returned by ajax controller function
(populate_document_select) to the view and update the text field but the
text field stays empty.

Any help would be greatly appreciated..
Thanks
I use cakephp 1.2

-- 
View this message in context: 
http://old.nabble.com/Updating-text-field-and-observing-drop-down-list-using-ajax-helper-tp28688782p28688782.html
Sent from the CakePHP mailing list archive at Nabble.com.

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to