Jump to content
Kurre

Mouse cursor active in the search box

Recommended Posts

Can you, within admin under Catalog - products / categories, make so that the mouse cursor is active in the search box at once without clicking there?

Share this post


Link to post
Share on other sites

I guess it is this code that I should change ?

 

<?php
    echo tep_draw_form('search', 'categories.php', '', 'get');
    echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search');
    echo tep_hide_session_id() . '</form>';
?>
                </td>
              </tr>
              <tr>
                <td class="smallText" align="right">
<?php
    echo tep_draw_form('goto', 'categories.php', '', 'get');
    echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onchange="this.form.submit();"');
    echo tep_hide_session_id() . '</form>';
?>

 

Share this post


Link to post
Share on other sites

I have tried this and it works.

Edit the file admin/categories.php.

1) Find the line at around line 888:

Quote

          echo tep_draw_input_field('search',);

Change it to:

Quote

          echo tep_draw_input_field('search','','id="mySearch"');

2) Add this javascript to the bottom of the file:

Quote

<script>
window.onload = function() {
  document.getElementById("mySearch").focus();
};
</script>

Done.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×