aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes multiple buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "multiple buttons" Watch "multiple buttons" New topic
Author

multiple buttons

krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158
hai, how to assign servlets to buttons in case of multiple buttons.

have a nice day.

krishna prasad


have a great day,
krishna prasad
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You mean set the action to different locations.

Personally I would have the server determine what to do and not clientside code, but...

&#nclick="document.formName.action='foo'"

Eric
krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158
thanks, but i don't understand what you mean by,

'I would have the server determine what to do and not clientside code'.

krishna prasad
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61761
    
  67

Actually I would not advise using a single URL for multiple actions.

You didn't give much context on your issue. If the buttons are submit buttons in a form, you can use an onsubmit handler to change out the action of the form just before submission. If not, then using disparate onclick handlers will let each button do whatever they want.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: multiple buttons