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?

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 Tutorials/Questions & Answers:
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
Advertisements
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
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
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
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
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
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
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
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
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
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
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
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
form
form   Can I prevent a form from being submitted again
HTML Post Form
HTML Post Form       The HTML process the submission of form in two different ways. In HTML, the method is declared inside a FORM element. The form method is  used
Third Normal Form (1NF)
Third Normal Form (1NF)       Third Normal Form (1NF) The Third Normal Form has one more...; A. It should meet all the requirements of the second normal form.     
Aggregating Actions In Struts Revisited
; Multiple submit buttons within the same form only differing...Aggregating Actions In Struts Revisited... Aggregating Actions in Struts , I have given a brief idea of how to create action
Two Dimensional Array Program
will learn how to display arrange form of two dimensional array program... Two Dimensional Array Program    ... a integer for array declaration Two dimensional array program. We are going
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
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
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
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
Two dimensional array in java
of similar data type or it can hold fixed number of value of same type. Two...Two dimensional array in java. In this section you will learn about two... will be established, it is fixed when created.In two dimension array data
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
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
different kinds of actions in Struts
different kinds of actions in Struts  What are the different kinds of actions in Struts
compare two strings in java
) { System.out.println("The two strings are the same."); } } } Output: The two strings are the same. Description:-Here is an example of comparing two...compare two strings in java  How to compare two strings in java
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
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
Split a list into two equal size list
node **q, int n) { struct node *temp; int i =1; temp = p; while( i < n) { temp = temp->link; i++; } *q = temp->link; temp->link = p; temp = *q; while(temp->link != p) temp = temp
Two Dimensional Array Program Using Nested For Loop
of Java. In this lesson we will learn how to display arrange form of two... Two Dimensional Array Program Using Nested For Loop ...;. We are going to make a integer for array declaration Two dimensional array
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
Merge and sum of two dictionaries
Merge and sum of two dictionaries  Hi, I want to merge the two dictionaries and at the same I want to sum the vales of the same key. How I can...(term3) print(sumAllTerms) Thanks   Hi, Check more tutorials
Multiple form in Jsp
Multiple form in Jsp       In this section, we have developed an Multiple form application . We created two file userform.jsp and UserForm.java. ADS
Creating Canvas Form Example
Creating Canvas Form Example       This example shows that how to use the Canvas Class in a Form. In this example we take two field in which integer number passed from the form
ModuleNotFoundError: No module named 'actions'
ModuleNotFoundError: No module named 'actions'  Hi, My Python... 'actions' How to remove the ModuleNotFoundError: No module named 'actions... to install padas library. You can install actions python with following command
Struts2 Actions
Struts2 Actions       When... Action interface  All actions may implement... to create POJOs that maintains the same contract defined by this interface
Actions Threadsafe by Default - Struts
Actions Threadsafe by Default   Hi Frieds, I am beginner in struts, Are Action classes Threadsafe by default. I heard actions are singleton , is it correct
Two Pagination in one page
Two Pagination in one page  hai friends any one help me. how do u make two pagination script in same page i'm used some ajax coding one pagination script is working but another pagination is not working please help me urgent
two text box problem
two text box problem  i have two text box in two different pages and same variable use in two text box when enter value in first text box it's reflection show in second text box , how i reduce it in jsf ?   Hi Friend
PHP form
PHP form  Hi Sir/Madam, I am developing an attendance form using php... not getting How to read these Multiple textfield with the same name values in another form and update them to respective coloumn... Please any one help mo out please
ZF Simple Form Creation
ZF Simple form creation: In the current tutorial we will study how to create a simple form in Zend Framework. We will use two ways to create  form... that phtml file as a simple html file. So, we can create a form in that file
ModuleNotFoundError: No module named 'same'
ModuleNotFoundError: No module named 'same'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'same' How to remove the ModuleNotFoundError: No module named 'same' error
ModuleNotFoundError: No module named 'same'
ModuleNotFoundError: No module named 'same'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'same' How to remove the ModuleNotFoundError: No module named 'same' error
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
Same day travel deals
Same day travel deals  Hi, Can anyone compare same day travel deals with different travel packages? Thanks
Hash value is not same - Java Beginners
Hash value is not same  Hi, I've two Excel files with same data. One is in Excel 2003 (.xls) format and other one is in Excel 2007 (.xlsx) format... 2003 files is not same as the hash value of Excel 2007 file. What might

Ads