My employer wants a drop down for sorting the results instead of links.
I want to do this by launching a js function that make a click on the
appropriate link that is hidden.
It is this the right way to do it ?
And if so, haw can I insert a ID in the "a href" that $paginator->sort
set on the page.
Replace this:
<CODE>
<?php echo $paginator->sort('Initial Rate', 'initialrate',
array('id'=>'test')); ?>
<?php echo $paginator->sort('Initial Monthly repayments',
'initial_monthly_payment'); ?>
<?php echo $paginator->sort('Cost per Thousand', 'cpt'); ?>
</CODE>
with:
<CODE>
<div style="display:none">
echo $form->input('sortBy',
array('type'=>'select','options'=>array('initialrate'=>'Initial
Rate','initial_monthly_payment'=>'Initial Monthly repayments',
'cpt'=>'Cost per Thousand'),
'empty'=>FALSE,'class'=>'styled','label'=>false,
'div' => false));?>
</div>
<?php echo $javascript->event("sortBy", 'change', 'mortgagesSortBy();');?>
</CODE>
Thanks for the time!
c05min.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---