If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Zen Cart Code Suggestions / Customers.php "Focus" Search Field (saves a click)

Customers.php "Focus" Search Field (saves a click)

Started by wolfderby on 20 Jan 2017, 7:12 PM · Views: 49

Results 1 to 1 of 1
20 Jan 2017, 7:12 PM
#1
wolfderby avatar

wolfderby

Zen Follower

Join Date:
Dec 2008
Location:
Pittsburgh, PA
Posts:
241
Plugin Contributions:
0

Customers.php "Focus" Search Field (saves a click)

zen-cart 1.5.5d

admin/customers.php

around line 583

    if (document.getElementById)
    {
      var kill = document.getElementById('hoverJS');
      kill.disabled = true;
    }
  }

to

    if (document.getElementById)
    {
      var kill = document.getElementById('hoverJS');
      kill.disabled = true;
      document.forms['search'].elements['search'].focus();
    }
  }

I know this is the smallest change but hey I'm learning.