hi,
  how to post selected index in selection box , This my coding...
In controller:
..........var $name = 'Alerts';
        var $helpers = array('Html', 'Form','Util');
       var $paginate=array('limit'=>10,'page'=>1,'order'=>array
('Alert.created'=>'DESC'));
        function index() {
               $this->Alert->recursive = 0;
               $this->set('alerts', $this->paginate());
           }
In index.ctp
.......
<script type='text/javascript'>
function orders(dd){
alert(dd);
//return dd;
}</script>
...............
echo $form->input('i',array('type'=>'select','options'=>array(
        '0'=>'Sort by Date Descending',
        '1'=>'Sort by Date Ascending',
        '2'=>'Sort by Category/Date Descending',
        '3'=>'Sort by Title/Date Descending'),
        'onChange'=>'orders(this.value)'));

i got id, but i dont have idea to pass the data from index.ctp file to
controller file.
Here input value  is not a database variable. If user select the order
in selection box how to change the paginate order query at
dynamically. I dont have idea. Any body help me, i really thanks to u.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to