SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Zealot YAHA's Avatar
    Join Date
    Jan 2008
    Location
    MD, US
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Search Form and Text Input

    Hello,

    I have an HTML form. The form contains only one field - input="text". This form is part of site's layout and thus I use some CSS to assign the image background. In all of tutorials on this topic, I saw people create a separate button or transparent GIF to serve as a submit. Currently, if I just hit Enter while the focus is at the form, it tries to execute. So, does this mean one can get away without creating a button ????
    If i assigned a script to handle the form's action, like this:

    <form name="Form" action="somescript.cfm">

    would it invoke the same process as after the regular submit execution???

    P.S. I guess, I am trying hard to avoid having a button because it is unfit for my layout. According to web standards, should one have a button near search field or its ok to have it execute by "Enter" ???

  2. #2
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    You definitely need a button. A lot of users are unaware that they can use Enter to submit a form when the cursor is in a text field, and will be completely unable to use the form without a submit button.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  3. #3
    SitePoint Zealot
    Join Date
    Feb 2009
    Location
    Baton Rouge, LA
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Totally agree with previous post. You definitely need a submit button. The label should read "Search" or "Go" (if you want to keep the button small).

    If you submit on enter, your site will also have accessibility issues (screen reader users will not like the automatic execution you are suggesting), which is bad practice.
    "The browser is your first client" - Quote: Myself
    Please visit me at: vanillacloud.com

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2008
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think that you should not use the botton, also could do the same fuction. sure, you are right.

  5. #5
    SitePoint Zealot FaridHadi's Avatar
    Join Date
    Nov 2008
    Posts
    170
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should definitely keep a submit button for your form. Just design something that matches the design of your site.

  6. #6
    SitePoint Zealot My220x's Avatar
    Join Date
    Dec 2008
    Location
    United Kingdom
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know everyone else has said it but a submit button is something you need on your form as not a lot of people know you can press Enter to submit a form.


Bookmarks

Posting Permissions

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