Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1. #11
    Join Date
    Jan 2010
    Location
    Australia
    Posts
    239
    Plugin Contributions
    1

    Default Re: Have cursor in search sidebox

    Here is Complete Guide:

    1. Make a folder on_load in includes/templates/TEMPLATE/jscript/
    2. create a file on_load_*.js inside that folder
    3. copy document.getElementById('YOUR_DEFINED_NAME').focus(); inside your file
    4. go to includes/templates/TEMPLATE/sidebox/tpl_search.php
    5. Look for zen_draw_input_field('Keyword'.... and define id="YOUR_DEFINED_NAME"

    6. its done.

  2. #12
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Have cursor in search sidebox

    From mediacollege.com:
    "The following example shows a text field in a form:

    <form name="myform">
    <input type="text" name="mytextfield">
    </form>

    Add the following code to the body tag, substituting the form and field names for your own:

    <body OnLoad="document.myform.mytextfield.focus();">

    That's all there is to it — the OnLoad command instructs the browser to wait until all elements are loaded and then set the focus to the specified form/text field."

    Since the on_load_xxx.js content will be put between the quotes in the Zen Cart <body> tag, it looks like its content could be
    Code:
    document.quick_find.keyword.focus()

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v150 padlock on login broken, because of header search and sidebox search. Any fix?
    By zenartman in forum Customization from the Admin
    Replies: 6
    Last Post: 11 Apr 2015, 06:30 AM
  2. Replies: 2
    Last Post: 2 Feb 2010, 11:48 AM
  3. How can I have a custom cursor and favicon?
    By clearviewfx in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 7 Jan 2010, 02:41 PM
  4. Question about search sidebox and search header
    By jenzi in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Sep 2008, 06:47 AM
  5. Can I get IE to have an hourglass cursor during file upload?
    By ducksigns in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 28 Oct 2007, 03:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg