Home Answers Viewqa HTML Two or more actions in the same form

 
 


Clark
Two or more actions in the same form
2 Answer(s)      2 years and 7 months ago
Posted in : HTML

Can I have two or more actions in the same form?

View Answers

November 2, 2010 at 3:04 PM


Hi friends, No. A form must have exactly one action.


December 25, 2012 at 8:04 PM


you can perform more than one action using java script. you have to write function and give different name for every action and on submit button you have to call that.

example

function pickDestination()
{
    var a = "/loginpage/" + document.pressed;
    document.getElementById("myform").action = a;
    return true;
}
</script>
    </head>
    <body>
        <form id="myform" action="#" onsubmit="return pickDestination();">


<td><input type="submit" name="WriteComment.jsp" value="WriteComment" onclick="document.pressed=this.name"/></td>
        <td><input type="submit" name="ViewComments.jsp" value="ViewComments" onclick="document.pressed=this.name"/></td>









Related Pages:
Two or more actions in the same form
Two or more actions in the same form  Can I have two or more actions in the same form
more Submit buttons in the same form
more Submit buttons in the same form  Can I have two or more Submit buttons in the same form
Aggregating Actions In Struts Revisited
the same form only differing in their name.  The actual method to call...Aggregating Actions In Struts Revisited... Aggregating Actions in Struts , I have given a brief idea of how to create action
Struts2 Actions
Struts2 Actions       When... Action interface  All actions may implement... to create POJOs that maintains the same contract defined by this interface
Struts 2 Actions
Struts 2 Actions       In this section we will learn about Struts 2 Actions, which is a fundamental concept in most of the web... Framework. Actions are basically a unit of work that can be associated with a HTTP
JSP Actions : Java Glossary
JSP Actions : Java Glossary       JSP actions are XML tags that forces the server to directly use... Actions are made of a usually (XML-based) prefix of "jsp" followed
Displaying error on the Same form
Displaying error on the Same form  I want to display the errors on the same form(Top of the form) after validation. I am used Div element and Table...; } </script> <form method="post" onsubmit="return validate();" action
button actions in struts
button actions in struts  in my jsp page i have two buttons add and sub.when i clicking the add button one action is performed and clicking the sub button another action is performed.how i will handle it using struts.i am using
JSP Standard Actions 'jsp:setProperty' & 'jsp:getProperty'
JSP Standard Actions <jsp:setProperty> & <jsp:getProperty>.... If they have the same name, you can specify property and omit param. If a parameter has.... The two required attributes are:  name: the name of a bean previously
Login Form
of News and Events. These two are same for every page.There's also an image of +,on clicking which a login form appears. Only the middle column is different
Login Form
of News and Events. These two are same for every page.There's also an image of +,on clicking which a login form appears. Only the middle column is different
How to add two calendars on the same html page
How to add two calendars on the same html page  I have used the same... use single calendar for a single html page.but while implementing two calendars on same html page it doesn't work..The first calendar works but the second
Get form value in same page - JSP-Servlet
Get form value in same page  Hello friends, Can we get a form field value in the same to be processed in java coding...-registration-form-using-jsp.shtml Thanks
Dynamic form
clicked we have a new list created on the same form. Thanks for your help  ...Dynamic form  I need to make a dynamic form using jsp for example, i...; For the above code, we have created two database tables: CREATE TABLE `country
Program to check whether two given words pronouncing same or not?
Program to check whether two given words pronouncing same or not?  Program to check whether two given words pronouncing same or not? example: raju and rajoo pronouncing same please help me out
STRUTS ACTION - AGGREGATING ACTIONS IN STRUTS
types of aggregations, we must use the same mapping for all the CRUD actions...STRUTS ACTION - AGGREGATING ACTIONS IN STRUTS... using which you can aggregate a related set of actions into a single unified
problem in swing program for opening two windows with same login credentials
problem in swing program for opening two windows with same login credentials  I Face two problems while writing the code in swing program 1.i... into the system with same username,password two times then it opens two separate
AJAX REGISTRATION FORM
AJAX REGISTRATION FORM  I have implemented user name, check and state selection using ajax, in the html registration form. I am loading two XML... either username or state. How to implement both in same registration form could any
Refresh the form - Struts
Refresh the form  Hi How Can i control the page that doesn't go to refresh when i am doing 1 or more action from same page and forward those action again to same page. how can i control the doesn't go to refresh in that page
Two- Dimensional Array - Java Beginners
Two- Dimensional Array  I am new in java programming. I am creating a two-dimensional array. This is my code ** class BinaryNumbers { public static void main(String[] args) { //create a two-dimensional array int ROWS = 21
Exceptions - More
Java NotesExceptions - More Exceptions | Exception Usage | Exceptions - More Kinds of Exceptions There are many exceptions, but they can be put into two groups: checked exceptions and unchecked exceptions
more code help
more code help  Instructions: Write a program to translate a message from English to Morse code. Using a simple text editor like Windows Notepad... or number that corresponds to the symbol on the same line, but that is optional
Servlets errors in same page.
Servlets errors in same page.  How do I display errors list in the same page where a form field exists using servlets...........i.e. without using JSP? Please explain with a simple username password program
how to restrict user against marking same event more than one times - JSP-Servlet
how to restrict user against marking same event more than one times ... giving multiple time same test. Is it possible that once user marked particular test, the same test should not display them once he/she will log in next time
SEND + MORE = MONEY
SEND + MORE = MONEY  Problem Description Write a program to solve... of magic formula is no more than 3, the number of digits of every number is no more... with the same order of original formula, and seperate each number and operator
Determining if two Filename paths refer to the same file.
Determining if two Filename paths refer to the same file... to determine that the file name refers to the same file or not. What you need to do is to create two File object and pass the file name in the constructor of both
i want to retriev and update in same form but its not working pls help....
i want to retriev and update in same form but its not working pls help....  <p><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN... id="contentarea"> <form name="viewpart" action="viewparticularappli.jsp
load more with jquery
load more with jquery  i am using jquery to loadmore "posts" from my... box its is going to display php posts and after that when i click on load more...); $('#loadmorebutton').html('Load More
Facing Problem with submit and cancel button in same page - Struts
Facing Problem with submit and cancel button in same page  Hi, can... but i am unable to know how to write the form and action classes   Hi friend, Read for more information. http://www.roseindia.net/struts
to store form vaues in database - JDBC
to store form vaues in database  sir i have created one form with two fields. 1.name 2.father name if we enter the values to these fields... Data is inserted successfully in database. For more
Developing Forgot Password Form
Developing Forgot Password Form   ... Form code for our application. Developing Forgot Password Form   The forgot password form will be used, when user forgot their password. This form
Actions in Struts
Actions in Struts  Hello Sir, Thanks for the solutions you have sent me. i wanted examples on Struts DispatchAction,Forword Action ,Struts lookupDispatchAction,Struts mappingDispatchAction,Struts DynaActionform.please
server with two port - Java Server Faces Questions
server with two port  Hello, want to write two port server socket program using Java, (i.e. single server program which is listening on two ports (say 3122 and 3133) simultaneously. In this program when two different clients
redirecting a login authenticated form to a form to be displayed on the same page from where the login authentication has taken place.
redirecting a login authenticated form to a form to be displayed on the same...;/script> <form name="form" method="post" action="http://localhost... true; } </script> <form name="form" method="post" action="check.jsp
how to get values for same column name from two different tables in SQL
how to get values for same column name from two different tables in SQL  how to get values for same column name from two different tables in SQL???? column name is emp_id loacated in these two tables company,employee
can i restrict a class that it will not allows create more than two objects - Java Interview Questions
can i restrict a class that it will not allows create more than two objects  hi all, can i restrict a class that it will not allows create more than two objects can any help me please. Thaks bala k
Combining records from two or more orders files into a single ordered file is called
Combining records from two or more orders files into a single ordered file is called  Combining records from two or more orders files into a single ordered file is called? 1. Menu 2. Merging 3. Taking 4. All of the above 5
how to add the two tables in same row when generating pdf file from jsp - JSP-Servlet
how to add the two tables in same row when generating pdf file from jsp  How to add the two tables in same row one is left side and other is right side please help me.   Hi Friend, Try the following code
Java: Cohesion
it will be convenient to do two things in a function because you're working on the same data. Try to resist this temptation. Make two functions if you... write two functions. // GOOD. The two actions are separated and given good
Spring 3.0 MVC Form, Spring 3.0 MVC Form Example
Spring 3 MVC Form Example In this tutorial we are going to develop Spring 3 MVC form example. This  application will help you learn the concept... in developing more complex applications using Spring 3 MVC module
Writing Actions
Writing Actions The Action is responsible for controlling of data flow within an application. You can make any java class as action. But struts have some built in interface and class for making action easily. To make an Action class
JSF form tag
is used to uniquely identify the form. CSS can be used to make it more attractive...JSF form tag      This tag renders html form element which contains the data that is submitted
Need to retain the values on submiting the form - XML
Need to retain the values on submiting the form  I have created the form using XML and XSL, with textbox,checkbox,textarea and two button submit and RESET. how to retain the values in the same page on clicking submit
jsp form
jsp form  hi sir, one got one got in jsp form after entering the data into the form the data is not saving in the database i will send you code of two forms if dnt understand my problem
add same tables in jsp page
add same tables in jsp page  hi I have a table in my jsp page with data, now I want to add same copy of table without its default value in same page whenever I click add more table, how do I do
even more circles - Java Beginners
even more circles  Write an application that compares two circle.... The method compares the radiuses. ? The program reads two radiuses from the user ? The program then creates two circle objects ? and compares them by using equals
different kinds of actions in Struts
different kinds of actions in Struts  What are the different kinds of actions in Struts
DOJO+Creating button of same size.
DOJO+Creating button of same size.  I am trying to create two buttons in DOJO of equal size. But the size of the buttons varies depending upon the name of the button that will get displayed. I tried by giving a class atribute
JOptionPane - More Dialogs
Prev: JOptionPane - Simple Dialogs | Next: none Java: JOptionPane - More Dialogs Here are some more useful static methods from javax.swing.JOptionPane... message dialog. The value two indicated that the "None of your business

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.