...

View Full Version : minimalist form suggestions?



subhailc
03-08-2004, 05:13 AM
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 :D

...

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...?

swmr
03-09-2004, 02:24 PM
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. :confused:


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. ;)

coder_seth
03-09-2004, 09:10 PM
word to that..

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

shlagish
03-10-2004, 03:11 AM
he wants to replace the submit button by letting the user press "enter". Am I right?

coder_seth
03-10-2004, 03:23 AM
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/

:D

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.

brothercake
03-10-2004, 06:09 AM
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.

coder_seth
03-10-2004, 06:55 AM
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?

shlagish
03-10-2004, 11:24 PM
All new browsers have it. Older browsers might not...

coder_seth
03-11-2004, 05:34 AM
well, that's my point.. is it really much of an issue anymore to worry about JS support?

STDestiny
03-11-2004, 06:17 AM
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

brothercake
03-11-2004, 09:45 AM
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.

coder_seth
03-11-2004, 04:27 PM
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.

:D

rant done. adios.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum