• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Is there a standard behavior for save buttons on forms?

 
Ranch Hand
Posts: 213
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a web standard that says that when the save button is clicked on a form that the form is submitted and then the form should close?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HTML standards are defined by the W3C - for example this documentation of FORMS in HTML.


Bill
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no such thing as a "save button"; did you mean "submit"? If so, the standard behavior is to submit the form to its action when the submit button is clicked.

As for "closing the form", I have no idea what you mean by that. The page is replaced by whatever the response to the submit is.
 
Richard Golebiowski
Ranch Hand
Posts: 213
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By "Save" button, I meant the submit button. The button says "Save", and the action is submitting the form data. I was told that the "web standard" is to submit the data and close the form, but I cannot confirm that. I looked atW3C but did not see anything saying that that is the case.
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The button can say anything, so the fact that yours says "Save" is not relevant and didn't tell us anything about its type. Buttons have types defined by HTML, such as "submit", "button", "reset".

Again, you'll need to explain what you mean by "close the form". The form will be submitted to the server action. What happens after that is up to whatever the server code decides to do.
 
Richard Golebiowski
Ranch Hand
Posts: 213
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By "close the form" I mean to exit the form and return to whatever the page was prior to the form be opened. What I'm doing is presenting a list of records. A user can click on a button to open a record from the list to edit it. One of my colleagues said that the "web standard" is that the edit form should be closed and the list displayed when the user clicks the save "submit" button. I'm trying to confirm if that is true or not.
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, there is no "web standard" for what happens after a form is submitted. The app can do whatever the business logic of the app dictates. If that's returning to a previous page (with updated data, no doubt) so be it. But there's no "standard" beyond what makes sense for the application and good usability.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What exactly do you mean by "opening" and "closing" a form?

An HTML FORM element is part of a page displayed by the browser, it doesn't have an "open" or "closed" property.

Are you perhaps trying to get at enabling or disabling the submit button?

There is no standard for automatically disabling the submit button after it has been pressed, which is why you can get multiple requests submitted from the same form.

Bill

 
Richard Golebiowski
Ranch Hand
Posts: 213
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By "opening" I mean displaying the form.
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you click on a submit button or click on any link, A request is made to a server which can server either a static or dynamic content based on the requested resource. The server sends back the response to browser in an HTML format and browser renders the response as it receives from server. There is no opening and closing of HTML form. If the response from the server is same as previously
displayed page, you will see the same page and if response is different , you get to see a new page.

Although you can open a new window by clicking on a link or by submitting on a form (i.e most of the websites have help link which is displayed in seperate window), it is not considered a good practice to do so.
 
Richard Golebiowski
Ranch Hand
Posts: 213
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This simple question is being buried in semantics so let me state the scenario as simply as possible. In a web page I display a list of records. The user clicks on a button that says edit. The server serves up the edit page to the browser. The browser displays the page for editing the record. The user edits the record and clicks on a button that submits the edit record information to the server.

What is the next page that the server sends to the browser?
I have a coworker that says that the "standard" says that the server should display the list.
Is their any design standard or standard for best practices that states that when a user clicks on a button and submits the data to the server that the result from the server has to be the original list or can I just keep the user on the page that he is editing?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can send the user to wherever you want. There is no standard on this.

Eric
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I'll repeat what's already been said by me and others so it's perfectly clear: there is no such such standard. None. Nada!

Your next page can be whatever it wants to be. Anything. It can be the original list if that's what makes the most sense for the business needs of the application. But it could be something else completely if that's what makes sense.

Your coworker can claim anything he likes. It doesn't make it so.
 
Richard Golebiowski
Ranch Hand
Posts: 213
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks y'all!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic