• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can I have three buttons(same row) in the same form?

 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
I m invoking a servlet thro HTML submit button that outputs the detailed Reg form.It has three "submit" buttons in the end.Each has different action.I wish to place them in the same row of the table.How do I achieve this?
As far as I know there can be only one action.Shall I take three diff tables(1 row 1 column) having three forms resp. each having diff action.Right now they are placed one below the other.
Three common buttons are "submit" "back" and "cancel".
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to have three buttons that function as submit buttons, you could make three plain old buttons and supply their actions through their onClick() event. If you make them actual submit buttons, they will all perform the same action (the one you defined for your form). If you want to have a submit, cancel, and back button, that is no problem. Define your action in the form like you would normally. Then create a submit and reset button. Then create a plain old button and use its onClick() event to go back. Or you could just make it a button that is a link.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you can place three submit buttons on the same row. Here is an example:

Yes, there is only one action attribute on a Form. I place my controller servlet in the action attribute. You can make the submit request different by sending a parameter to the servlet. The servlet would be coded to perform different requests based on the incomming parameter. The parameter can be sent to the servlet by appending a parameter at the end of the action attribute using Javascript. Another way you can send a parameter is by defining a hidden field and by setting it to a different values for each request. Here is an example:

Let me know if you have any questions,
Joe


[This message has been edited by Joe Paolangeli (edited January 30, 2001).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic