jquery - ajax keyword search from the database in drupal -
this code ajax search have :
function mymodule_menu() { $items = array(); $items['ajaxsearch'] = array( 'title' => 'search through ajax', //page title 'description' => 'a form mess around with.', 'page callback' => 'drupal_get_form', 'page arguments' => array('ajaxsearch_form'), 'access arguments' => array(''), 'access callback' => true, 'type' => menu_callback ); return $items; } function ajaxsearch_form($form, &$form_state) { $form = array(); $form['search'] = array( '#title' => t('search name'), '#type' => 'textfield', ); $form['submit'] = array( '#type' => 'submit', '#value' => 'submit', ); return $form; } function ajaxsearch_form_submit($form,&$form_state){ } ?>
please send me code ajax search data database in drupal when typing d in text box ..it show data related k in database me .
Comments
Post a Comment