Share on Google+Share on Google+

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

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

Ads

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
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
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
Tutorials   
Java Spring Hibernate Struts Training How to display button as a link in vaadin? hi change navbar dropdown color in bootstrap How to remove the background color of bootstrap menu bar? How to change color of opened Bootstrap drop down toggle? Setting bootstrap container background color Help school all activities and admision process.. add one row after another date make a webpage HTMl HTMl Source code how to apply globalisation to a world wide asp.net application how to print HTML using javascript or Jquery How to recover from google panda update? How to survive google panda 4.0 update How to find if you have been hit by Panda 4.0 Design a web page using XHTML and JavaScript that does the followings: ffmpeg converting file mp4 to mov JavaScript How to Disable Catch-all Emails on CPanel z-index always on top What is Web hosting Database and HTML web development trainee Uploading files Image Gallery Image Gallery dropdown How to redirect from a HTML page? Easiest method for expiring the css and js headers HTML WITH AJAX VB 6 Read Web Page Header string palindrom using vbscript? html button How to add mod_deflate to apache without recompiling How to use place hoder in IE(version : 8) Html Software Question div align left css Fetching data from excel file on other website and display in interactive graph form where do I find the fix for tree view catalog not expanding and collapsing correctly for roseindia shopping cart 1.1 pass to next page to enter into a particular page only if the username,password and listbox value mtches hi Cricket stadium ticket booking design Need some help creating an order form. HTML div tag HTML div tag

Ads

 
Advertisement null

Ads