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



Home Answers Viewqa Struts Multiple buttons in struts using java script
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Clark
Multiple buttons in struts using java script
1 Answer(s)      4 years 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 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
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
Handling multiple buttons in HTML Form
Handling multiple buttons in HTML Form  How to handle Handling multiple buttons in HTML Form
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
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
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
Java Script
Java Script  why we are using java script
Java script
Java script  Source code for capturing the screen 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
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
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
 

 

 

DMCA.com