Web Analytics Made Easy -
StatCounter minimalist form suggestions? - CodingForum

Announcement

Collapse
No announcement yet.

minimalist form suggestions?

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

  • 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 [email protected] 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
    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 [email protected] 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... ?

    Comment


    • #3
      word to that..

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

      Comment


      • #4
        he wants to replace the submit button by letting the user press "enter". Am I right?
        Shawn

        Comment


        • #5
          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 protected]" as the form action will work, however i would visit this site first before you consider it:





          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.

          Comment


          • #6
            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

            Comment


            • #7
              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?

              Comment


              • #8
                All new browsers have it. Older browsers might not...
                Shawn

                Comment


                • #9
                  well, that's my point.. is it really much of an issue anymore to worry about JS support?

                  Comment


                  • #10
                    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

                    Comment


                    • #11
                      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

                      Comment


                      • #12
                        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.

                        Comment

                        Working...
                        X