Advertisement
Guest User

Untitled

a guest
May 26th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.03 KB | None | 0 0
  1. Autocomplete.php
  2.  
  3. <?php use_helper('Javascript') ?>
  4.  
  5. <?php echo javascript_include_tag('/sf/prototype/js/prototype.js') ?>
  6. <?php echo javascript_include_tag('/js/javascript.js') ?>
  7. <?php echo javascript_include_tag('/sf/sf_web_debug/js/main.js') ?>
  8. <?php echo javascript_include_tag('/sf/prototype/js/builder.js') ?>
  9.  
  10.  
  11. <?php echo input_auto_complete_tag('Companies', '', 'autoCompleta/buscarUsuario',
  12.                                 array('autocomplete' => 'on', 'onClick' => 'this.select();'),
  13.                                 array('use_style' => true, 'after_update_element'  => "function (inputField, selectedItem) { $('object_id').value = selectedItem.id; }")) ?>
  14.  
  15.  
  16. action.class.php
  17. class autoCompletaActions extends sfActions
  18. {
  19.     public function executeBuscarUsuario()  
  20.     {  
  21.         /*
  22.        $letras = $this->getRequestParameter('UsuarioApellido');  
  23.        $c = new Criteria();  
  24.        $c->add(UsuarioPeer::APELLIDO,"${letras}%",Criteria::LIKE);  
  25.        $this->usuarios = UsuarioPeer::doSelect($c);
  26.        */    
  27.     }
  28. }
  29.  
  30. tempalte
  31. <ul>
  32. <li>Uno</li>
  33. <li>Dos</li>
  34. <li>Tres</li>
  35. </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement