Hi all. I have the standard search form . I have (via hook_form_alter) unset the $form['submit'] button and I have insert this
//unset($form['submit']); $form['search_block_form_keys']['#size'] = 18; $form['sumbit2'] = array( '#value' => '>>', '#prefix' => '<div class="submit"><a onclick="submitSearch();return false;" href="#">', '#suffix' => '</a></div>', );
drupal_add_js(" function submitSearch() { document.getElementById('search-block-form').submit(); return false; } ","inline"); break;
I have thinked that this worked (when click on the A TAG my "submitSearch()" function is call) but it si not true. The only way to make this works is to remove the // before unset() [first line of my code]
Why this ?