Thursday, May 24, 2012

Update div with Selectbox

Hi all together,

i have a selectbox in my edit and add view. This Box is getting some informations from an other model.
So i tried with following code nd i works great

<?php
    echo $this->Js->link($place['Place']['stadt'],
        array(
            'controller' => 'events',
            'action' => 'data_interface',
            $place['Place']['id']
        ), array(
            'update' => '#target-div',
        )
    );
    echo $this->Js->writeBuffer();
?>

But the Code will give me the informations as links. But i want to put it into a selctbox.
So i try to write it as an selectbox. The values will appear in the selectbox but nothing happen when the value is selected.

Here is my code i tried

<?php
    echo $this->Js->Form->select('place_id',
        $select_value,
        array(
            'controller' => 'jobs',
            'action' => 'data_interface',
            $place['Place']['id']
        ),
        array(
            'update' => '#target-div',
        )
    );
    echo $this->Js->writeBuffer();
?>


Anybody an idea what is todo ?

Nice Greetings
Jerome

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: