Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Autocomplete.php
- <?php use_helper('Javascript') ?>
- <?php echo javascript_include_tag('/sf/prototype/js/prototype.js') ?>
- <?php echo javascript_include_tag('/js/javascript.js') ?>
- <?php echo javascript_include_tag('/sf/sf_web_debug/js/main.js') ?>
- <?php echo javascript_include_tag('/sf/prototype/js/builder.js') ?>
- <?php echo input_auto_complete_tag('Companies', '', 'autoCompleta/buscarUsuario',
- array('autocomplete' => 'on', 'onClick' => 'this.select();'),
- array('use_style' => true, 'after_update_element' => "function (inputField, selectedItem) { $('object_id').value = selectedItem.id; }")) ?>
- action.class.php
- class autoCompletaActions extends sfActions
- {
- public function executeBuscarUsuario()
- {
- /*
- $letras = $this->getRequestParameter('UsuarioApellido');
- $c = new Criteria();
- $c->add(UsuarioPeer::APELLIDO,"${letras}%",Criteria::LIKE);
- $this->usuarios = UsuarioPeer::doSelect($c);
- */
- }
- }
- tempalte
- <ul>
- <li>Uno</li>
- <li>Dos</li>
- <li>Tres</li>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement