Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    Regular Coder
    Join Date
    Jan 2004
    Posts
    185
    Thanks
    2
    Thanked 1 Time in 1 Post

    minimalist form suggestions?

    text field (can be expandable or restricted, doesn't matter) - using <input> or <textarea> whatever. on enter submits to one non-changing, predetermined email address (use e@mail.com for the sake of arguement) - so no submit or reset buttons.

    as you're all aware, there are many ways to go about this... my question is : what is the smallest bit of script/code you guys know of to render this little fella'? as of now i'm using a javascriptlet that works fine and isn't really that large, but i bet there's something smaller/cleaner/faster that i'm not aware of (my new goal is to keep the entire code for every page completely viewable when opened in notepad arial 10 on a 1024x768 res monitor

    ...

    i'm getting geekier by the minute :|

    thanks.

    oh p.s. (unrelated but curious) on the initial value of a formfield, is there a way to change the inner html - that is, to have some red text and some black text, for example...?

  • #2
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: minimalist form suggestions?


    Originally posted by subhailc
    text field (can be expandable or restricted, doesn't matter) - using <input> or <textarea> whatever. on enter submits to one non-changing, predetermined email address (use e@mail.com for the sake of arguement) - so no submit or reset buttons.

    as you're all aware, there are many ways to go about this...

    Many ways to go about what? Your topic sentence was practically incomprehensible.

    Originally posted by subhailc
    as of now i'm using a javascriptlet that works fine and isn't really that large, but i bet there's something smaller/cleaner/faster that i'm not aware of

    You might stand a better chance of receiving advice if said code was presented in the JavaScript forum, along with a more carefully worded question.
    hmm... ?

  • #3
    Banned
    Join Date
    Jan 2004
    Location
    Minneapolis, MN
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts
    word to that..

    i don't know how people can expect help with a problem that they can't even communicate.

  • #4
    Senior Coder
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    1,063
    Thanks
    2
    Thanked 0 Times in 0 Posts
    he wants to replace the submit button by letting the user press "enter". Am I right?
    Shawn

  • #5
    Banned
    Join Date
    Jan 2004
    Location
    Minneapolis, MN
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ah i see. i think having food in my tummy helps.

    i don't think Javascript can handle that on its own, unfortunately. useing "mailto:email@address.com" as the form action will work, however i would visit this site first before you consider it:

    http://lab.artlung.com/other/email-submission-stinks/



    server-side options such as PHP would be better. PHP is free of course, and the script for processing a form and sending an email is painfully simple.

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you don't have a "submit" button then the built-in behavior to submit the form from pressing the "enter" key doesn't happen - you have to handle it explicitly using a javascript key event. But not all browsers support key events, and not all browsers support javascript. If you do this, you're creating a form that a proportion of your visitors will not be able to submit at all.

    So, you have to have a real "submit" button. You can style it with CSS, or use <input type="image" ... />, but the button has to really be there.

    Same applies to <select> elements - don't rely on onchange to submit a form.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #7
    Banned
    Join Date
    Jan 2004
    Location
    Minneapolis, MN
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts
    is javascript support really that significant though? i just recently built a site which included a page that jumps to various pages (one page calling dynamic content, technically) using a <select> jump menu and onchange. it works in IE5x,6, Firefox, Opera, Moz..

    hasn't javascript support been pretty good for a while now?

  • #8
    Senior Coder
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    1,063
    Thanks
    2
    Thanked 0 Times in 0 Posts
    All new browsers have it. Older browsers might not...
    Shawn

  • #9
    Banned
    Join Date
    Jan 2004
    Location
    Minneapolis, MN
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts
    well, that's my point.. is it really much of an issue anymore to worry about JS support?

  • #10
    Regular Coder
    Join Date
    May 2003
    Location
    Manassas, VA, USA
    Posts
    220
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Many people decide to disable javascript. Those people wouldn't be able to use the form.

    Also, it's not realyl a good idea to go against what your user is going to expect. (Nearly) everyone expects to at least see a submit button when they fill out a form.

    (How would you like it if someone placed the scroll bar on the left side of the screen instead of the right )

    -Andrew
    Get the best Web Design books called Visual QuickStart Guides at the Peachpit Press
    Ithium Web Hosting

  • #11
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by coder_seth
    is it really much of an issue anymore to worry about JS support?
    Yes it is - and will continue to be for the foreseeable future. Many of the people surfing the web without javascript are using Internet Explorer 5 or 6 - particularly within companies, JS is often stripped out at the firewall for the sake of security, because IE has numerous exploitations against which there is no defense other than turning off scripting.

    Roughly 10% of all internet users do not have javascript. You cannot rely on scripting for anything which is essential and doesn't work without it.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #12
    Banned
    Join Date
    Jan 2004
    Location
    Minneapolis, MN
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts
    fair enough.

    comments like, "how would you feel if the scrollbar was on the left," make me ill, however. i understand your point, but there's another point there: stuff like that needs to be more acceptable. users, need to have more responsibility to be critical thinkers. it doesn't even take much. i've heard some pretty ridiculous comments about simple interfaces that people have a hard time with. there's no respect for exploration or using, oh i dunno.. YOUR ****ING MIND.



    rant done. adios.


  •  

    Posting Permissions

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