PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Customize simple search box

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Customize simple search box

    I've added a simple search box to the site.

    Code:
    <form method="get" action="search/search.php">
        <input type="text" name="zoom_query" size="11" maxlength="50"/>
        <input type="submit" value="Go" />
    </form>
    How do I customize the submit button? I've created go.gif image that I would like to use for the submit button.

    Thank you,
    Barb

  • #2
    I found the answer:

    Code:
    <form method="get" action="search/search.php">
        <input type="text" name="zoom_query" size="13" maxlength="100"/>
        <input type="image" src="Images/go.gif" alt="Submit" border="0">
    </form>
    I hope this helps someone else.

    Barb

    Comment


    • #3
      This is OK if you are creating your own search form. If you are trying to change the default search form generated by the script, you can use CSS to customise the search form instead.

      Change the "Submit" button to an image ("MyButton.gif"):
      input.zoom_button { background: transparent url(MyButton.gif) no-repeat center top; }

      Comment


      • #4
        I'm using the JavaScript search, and I modified the script to use an image, but I can still see the border of the original button and the text defined in search.js. If I remove the text from the search.js, it makes the button very small or it makes it go away completely.

        Any ideas?

        Thanks!

        Comment


        • #5
          You can specify the width and height of the button via CSS.

          If you modified the script, I can't be sure what you've done, so it is up to you. But changing the form HTML should not leave any border or text behind, if you used the way described by the original poster. In which case, we would recommend doing that via a custom search form as opposed to modifying the script. This is all explained here (including the example for the image button):
          http://www.wrensoft.com/zoom/support...tml#modifyform
          --Ray
          Wrensoft Web Software
          Sydney, Australia
          Zoom Search Engine

          Comment

          Working...
          X