naive question

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
User avatar
wvoyance
Forum Contributor
Posts: 135
Joined: Tue Apr 17, 2012 8:24 pm

naive question

Post by wvoyance »

Why <input type="button"...? is it essential? Is that button only for aesthetical reason?
Isn't <input type="text" ...etc is enough?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: naive question

Post by Celauran »

Isn't it enough for what? I don't really understand what you're asking.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: naive question

Post by requinix »

Respectively: because I want a button, nope, nope, and nope.
User avatar
wvoyance
Forum Contributor
Posts: 135
Joined: Tue Apr 17, 2012 8:24 pm

Re: naive question

Post by wvoyance »

Celauran wrote:Isn't it enough for what? I don't really understand what you're asking.
Sorry, my question is not clear enough.

To write an <input type="text" ....
is trying to submit some information through a form to a server.
But why there is a need for a button?
Simply <input type="text" and hit a return the information can also be submitted.

I just don't know why there is a need for a button?
Only for aesthetical reason? For giving people a place to click?

Perhaps, my knowledge for it is incomplete?
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: naive question

Post by social_experiment »

this could clear up the confusion for you
http://particletree.com/features/redisc ... n-element/
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: naive question

Post by pickle »

  • Not everyone knows to hit enter to submit the form.
  • As far as I know, it's not 100% guaranteed behaviour that all forms will submit when enter is typed.
  • Accessibility issues.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply