i'm trying to do the exact same thing and am experiencing the same
issues as you are.

On Nov 26, 10:06 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi all,
> my problem is occurring with creating a dropdown box that when
> selected, AJAX will place another dropdown box below it filled with
> choices according to the value chosen in box 1.
>
> I use the following code to generate the first dropdown box:
>
> <?php
> echo select_tag('department_choice', objects_for_select($depts,
> 'getName', 'getName'),
> array( 'onchange' => remote_function( array(
>
> 'update' => 'classSelection',
> 'url' => 'departments/GetCourses',
> 'with' => "'id=' + this.options[this.selectedindex].value",
> 'loading' => "Element.show('indicator')",
> 'complete' => "Element.hide('indicator')"
>                       )    )
>          ));
> ?>
>
> <div id="classSelection">
> </div>
>
> executeGetCourses in action.class.php, which will take the value from
> Box 1 and retrieve only the values from the CRN column of my 3 column
> table that have the same Name column value as the id chosen:
>
> public function executeGetCourses()
>         {
>                 $CRNcrit = new Criteria();
>
>                 $CRNcrit -> clearSelectColumns();
>                 $CRNcrit -> addSelectColumn( OfferedPeer::CRN );
>
>                 $CRNcrit->add( OfferedPeer::Name, $this-
>
> >getRequestParameter('id') );
>
>                 $this->crns = OfferedPeer::doSelect( $deptCrns );
>
> }
>
> and this is getCoursesSuccess.php:
>
> <?php
> use_helper('Object');
>
> echo select_tag( 'classes',  objects_for_select($crns, 'getCRN',
> 'getCRN') );
> ?>
>
> Is there anything wrong with this code, because when i execute it in
> my web page, nothing happens when i choose an option in box 1?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to