|
Posted by Alan J. Flavell on 08/15/05 11:28
On Sun, 14 Aug 2005, Randy Webb wrote:
> siliconmike said the following on 8/14/2005 8:51 PM:
>
> > I have a form inside which there are many links (not buttons).
>
> Use buttons, make them of type submit, and submit the form.
Don't use <button>s, they aren't implemented to specification by MSIE.
Use <input type=submit ....> controls, whose implementation is
generally reliable. Identify which one was used by appropriate use of
their name= and value= attributes.
> > How can I post form data when user clicks on any of these links ?
> > Do I need Javascript, or is this possible by regular html ?
>
> Client-Side Scripting of some sort.
Don't rely unnecessarily on client-side scripting. Use it, if at all,
only for an *optional* additional convenience.
> > I believe that form data can be posted using HTML, only when user
> > clicks on a button, right ?
That's intentional: form submission by POST (as opposed to GET) is
intended for actions which undertake some significant action, such as
ordering a pizza, casting a vote, etc. As such, there should be no
doubt in the user's mind as to whether they are undertaking this
action. The design should, as far as possible, defend the user
against inadvertent submission of such a request.
> Or the Enter Key when a form field has focus.
Some browsers do that, yes, although it's debatable whether it's
correct behaviour by the browser, since it *can* result in a user
inadvertently performing a POST request. Arguably, it should only
happen when the focus has been placed on the "submit" control. But
that's more a browser design issue, less a web page design issue.
best regards
[crossposted groups - I've proposed narrowed f'ups]
[Back to original message]
|