Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



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

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


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


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


Advertisement
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 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
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
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
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
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
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
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
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
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
different kinds of actions in Struts
different kinds of actions in Struts  What are the different kinds of actions in Struts
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
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
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
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
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
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
Is Multiple Actions in Action class - Struts
Is Multiple Actions in Action class  In ActionClass we can use only one action i.e execute(), but in DispatchAction we can use multiple actions.My question is , we can use multiple actions in Action class if(action.equals("add
form
form   Can I prevent a form from being submitted again
Struts Built-In Actions
Struts Built-In Actions   ... actions shipped with Struts APIs. These built-in utility actions provide different...;     Actions
Third Normal Form (1NF)
Third Normal Form (1NF)       Third Normal Form (1NF) The Third Normal Form has one more... the requirements of the second normal form.       B
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
hyperlink the pages with diff-2 actions struts - Struts
hyperlink the pages with actions struts  How to make a hyperlink in struts?  a href = "login.do" > Login </a>  hi i would suggest you to learn it from roseIndia Struts tutorials they have
Advertisements
 

 

 

DMCA.com