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



Home Answers Viewqa Struts Multiple buttons in struts using java script

Have Programming Question? Ask it here!
 
 
 


Clark
Multiple buttons in struts using java script
1 Answer(s)      3 years and 8 months ago
Posted in : Struts


Multiple buttons in struts using java script?


Advertisement
View Answers

November 20, 2010 at 2:47 PM


Hi friends,

This example defines how to create a multiple button in struts using javascript.

JSP Page :

<html:form action="/corporations.do?method=createPage" >
<tr>
            <td>BookID</td>
            <td><html:text property="bookID" size="20"/></td>
        </tr>
        <tr>
            <td>BookName</td>
            <td><html:text property="bookName" size="20"/></td>
        </tr>

<input type="button" value="Save and Continue" name="b1" onClick="save()">
      <input type="button" value="Discard Changes" name="b2" onClick="discard()">
</html:form>

In the Java Script
<script type="text/javascript" >

    function save() {

        document.OrganizationForm.action ="<%=request.getContextPath()%>/corporations.do?method=save";
        document.OrganizationForm.submit();
    }

    function discard() {

        document.OrganizationForm.action ="<%=request.getContextPath()%>/corporations.do?method=discard";
        document.OrganizationForm.submit();
    }
</script>

Thanks.



Related Tutorials/Questions & Answers:
Multiple buttons in struts using java script
Multiple buttons in struts using java script  Multiple buttons in struts using java script
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project...="file" name="file[]" multiple/> <html:submit value = "S U B M I T"/>
Advertisements
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project...="file" name="file[]" multiple/> <html:submit value = "S U B M I T"/>
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project...="file" name="file[]" multiple/> <html:submit value = "S U B M I T"/>
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project...="file" name="file[]" multiple/> <html:submit value = "S U B M I T"/>
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project...="file" name="file[]" multiple/> <html:submit value = "S U B M I T"/>
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project...="file" name="file[]" multiple/> <html:submit value = "S U B M I T"/>
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project...="file" name="file[]" multiple/> <html:submit value = "S U B M I T"/>
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project...="file" name="file[]" multiple/> <html:submit value = "S U B M I T"/>
How to upload multiple images in java(struts) using jsp?
How to upload multiple images in java(struts) using jsp?  I have jsp... to upload the multiple images in struts Total images storing folder in project...="file" name="file[]" multiple/> <html:submit value = "S U B M I T"/>
uinavigationcontroller add multiple buttons
uinavigationcontroller add multiple buttons  How to add multiple buttons to the UINavigationController
java script - Struts
java script  how validation for date is performed in the top-down select.if the user clicks submit without selecting the date, month and year. what is the validation for selecting a date that is in future like jul 2009
multiple browsers in java script - JSP-Servlet
multiple browsers in java script  How to make my jsp browser specific?  Hi friend, For solving the problem visit to : http://www.roseindia.net/jsp/simple-jsp-example/JSPPlugins.shtml Thanks
Multiple submit buttons in single xhtml form - Java Server Faces Questions
Multiple submit buttons in single xhtml form  Hi all, Here I am attaching the source of the page , which containig two submit buttons. Somebody suggested to keep eaxh button in different form. I am new to JSF, can anyone split
how insert multiple images in mysql database with use of struts 1.3.8 or java method, with single bean,or using array
how insert multiple images in mysql database with use of struts 1.3.8 or java... ,with struts 1.3.8 and i want to insert multiple images in mysql database ,with use of struts 1.3.8 ,or with the help of Array methods ,like google multiple
form values in java script - Struts
form values in java script  how to get form values in java script functions with struts1.1
Handling multiple buttons in HTML Form
Handling multiple buttons in HTML Form  How to handle Handling multiple buttons in HTML Form
how to store multiple values from drop down in database where i am using java struts 1.3
how to store multiple values from drop down in database where i am using java struts 1.3  hii, i am coding a form where i need a keyskills attribute... is displaying.. i need code in java so that it takes multiple values
barcode reader using java script
barcode reader using java script  Hai all, I need code for one application in java and java script my requirement is, Scanning data directly into a field is the easiest of all implementations. The cursor is placed
Without Using Form in Java Script
Without Using Form in Java Script  HOw to Reset the data in javascript without using form tag
Create Multiple Buttons
Create Multiple Buttons using Java Swing       In this section, you will learn how to create multiple... have created an array of letters. Using this array, we have labeled the buttons
Display Multiple Images in jscrollpane using Java Jpanel
Display Multiple Images in jscrollpane using Java Jpanel  Browse and Display multiple images in vertical view of java jscrollpane using jpanel
Hit Counter Schema using java script - WebSevices
Hit Counter Schema using java script   Dear Sir, I am sending you none project i need you help please tell me how to do it? first I have... the cookie by using a random sessionID. for that I have to use a page
Java Script
Java Script  why we are using java script
Java script
Java script  Source code for capturing the screen using Java Script
Storing Multiple image in sql using java
Storing Multiple image in sql using java  Hi, How to store and retrieve a multiple image in sql using java but already i have created sql table if i want to insert a image while runtime execution. Can anyone tell me solution
Multiple inheritance using interface - Java Beginners
Multiple inheritance using interface  Hi, I understand.... But the use of the interface is when we use multiple inheritance with more than one... in multiple inheritance Thank you, Rajkanth  Hi Friend, Please
Java Script
Java Script  Hi, Any one please share a code to swap the 2strings using java script
Hide buttons in Java Swing
Hide buttons in Java Swing In this section, you will learn how to hide buttons using java swing. For this, we have created three buttons, A, B and C. We have performed an action on C. When you click the button 'C', buttons A and B
how can clear the browser cache memory using java script
how can clear the browser cache memory using java script  how can clear the browser cache memory using java script
java script
java script  Hi, Any one please tell me how, to store below elements in an array using java script 12,13,14,a,b,xyz
Java script
Java script  a java script code for accept 10 numbers from the user and print in the descending order without using sort method
multiple selections list in Struts
multiple selections list in Struts  How to create a multiple selections list in Struts? and retrive seleted values
java script
java script  I want to display set of radio buttons after i select one option of the combobox
Browser Back Button Disable/Hide/Invisible using Java Script
Browser Back Button Disable/Hide/Invisible using Java Script  Dear Sir, Please Help..., Q: How to Write Code For Browser Back Button Disable/Hide/Invisible using Java Script without Page Reload/Refreshing. anyone
Merge multiple jasper file to one word Doc using java
Merge multiple jasper file to one word Doc using java   how to Merge multiple jasper file to one word Doc using java
Multiple file upload - Struts
Multiple file upload  HI all, I m trying to upload multiple files using struts and jsp. I m using enctype="multipart". and the number of files... only with servlets and i m using struts. I have this implemeted in servlets
remove item from list box using java script - Java Beginners
remove item from list box using java script  remove item from list box using java script  Hi friend, Code to remove list box item using java script : Add or Remove Options in Javascript function addItem
Java Script
Java Script  What is Java Script? How to learn Java Script?   Hi Java Script is client side programming language. It runs on browser.... You can learn Java Script from our JavaScript - JavaScript Tutorial pages
java script
java script  how to write a Java script program to enter number in two text fields and then automatically display the total in another text field
Java Script.
Java Script.  Hi i want to submit two form using javascript.The below code submitting two forms in server but its not working in browser like chrome and firefox am struggling for many days give me solution as soon as possible
how can i achieve multiple inheritance in java without using inheritance ?
how can i achieve multiple inheritance in java without using inheritance ?  how can i achieve multiple inheritance in java without using inheritance
Radio Buttons - Java Beginners
recovery page(like forgot gmail password question and answer page)using the radion buttons in display the same page in jsp.I need only how to make the question and answer page using the radio buttons.please help me to solve
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script
Java Script  Hello Sir, Is it possible to select only current date from datetimepicker in struts2 through java script validation. Means when i select.... Try to send me java script validation code for this purpose that user won't
how to upload and download images using buttons in jsp?
how to upload and download images using buttons in jsp?  how to upload and download images using buttons in jsp
multiple configurstion file in struts - Struts
multiple configurstion file in struts  Hi, Please tell me the solution. I have three configuration file as 'struts-config.xml','struts-module.xml' and 'struts-comp.xml'.I have three jsp pages as 'index1.jsp','index2.jsp
Advertisements
 

 

 

DMCA.com