Regarding multiple submit buttons in a page!!

hi all,
If i have two submit buttons in a html page then i can put them in two separate forms ,one form with get method and another with post method and pass the information to the servlet and then retrieve the values using doGet and doPost methods. How can i retrieve the information in the servlet if i have multiple submit buttons in my html page?
pls help me.......

is your question how do i know what button was pressed?
in html
<INPUT name="type" value="a" type="submit">
<INPUT name="type" value="b" type="submit">
<INPUT name="type" value="c" type="submit">
<INPUT name="type" value="d" type="submit">in servlet
String type = request.getParameter("type");
// type = a | b | c | d

Similar Messages

  • How To Create On Submit Button For Master_detail Page ?

    I have adf page that is master And detail view.
    i want to have one submit button for master and detail block

    Duplicate of  How To Create On Submit Button For Master_detail Page ?
    Please don'r post your question multiple times.
    Timo

  • Multiple Submit buttons in Adobe form !

    Hello Experts,
    Scenario :
    Form has Material number as input field and Material description should get automatically populated( maybe as a script or button , dont know yet ). Then the form is to be submitted at the backend.
    I have created an Adobe interactive form with Multiple Submit buttons( one is Submit toSAP) button , other is a normal pushbutton( for Material desc to be populated ) . I have been able to Submit data at backend.
    But problem is there is only one event on the Interactive form UI element properties.
    Please suggest how to achieve the above ? via script or sm code in web dynpro ?
    System Config :  WAS 6.4 /  SP12 .
    Need a quick resolution. Generous points for help.
    Regards,
    Sonika

    Hi Sonika,
    control_param structure is used in case of ISR forms, but I dont think your form is related to the ISR.
    Use a context attribute, and set its value to get the Material description from backend.
    Like you can define an attribute in context, "GETDESCRIPTION", and set its value at the exit event of Inputfield to "GET".
    $.parent.GETDESCRIPTION.rawvalue = "GET"
    app.eval("event.target.SAPSubmit();");
    And at the click event of the button you can write:
    $.parent.GETDESCRIPTION.rawvalue = "SET"
    app.eval("event.target.SAPSubmit();");
    And in the backend, read the value of this attribute and perform the desired action.
    Hope this helps,
    Amit

  • Multiple submit button on jsp

    Hello,
    Can I have multiple submit button on single JSP page?
    if its possible then tell me how?
    And how to call multiple functions in JSP?
    reply me urgent

    I think this code will help you
    <html>
         <head></head>
         <script>
              function submitForm(clickedButton){
                   if(clickedButton.name =="button1"){
                        alert("button1");
                        document.multipleSubmitDemoForm.action="linkToJSPWhenFirstButtonClicked.jsp";
                   }else if(clickedButton.name =="button2"){
                        alert("button2");
                        document.multipleSubmitDemoForm.action="linkToJSPWhenSecondButtonClicked.jsp";
                   }else if(clickedButton.name =="button3"){
                        alert("button3");
                        document.multipleSubmitDemoForm.action="linkToJSPWhenThirdButtonClicked.jsp";
                   document.multipleSubmitDemoForm.submit();
         </script>
         <body>
              <form name="multipleSubmitDemoForm" method="POST" action="" >
                   <input type="button" name="button1" onClick=submitForm(this) />
                   <input type="button" name="button2" onClick=submitForm(this) />
                   <input type="button" name="button3" onClick=submitForm(this) />
              </form>
         </body>
    </html>

  • How to distribute a form with multiple submit buttons?

    I have a form that has multiple submit buttons depending on the information that is being entered and then who the information should go to.  When I try to disbribute the form, I get an error message stating the following, "Acrobat is unable to distribute this form because it contains multiple submit buttons with different formats or return URLs."  Is anyone able to let me know how I can distribute the form?

    Sounds as if you need your own web script to process submissions - written by an experienced web programmer (I very strongly recommend someone familiar with all the latest security weaknesses, and not a project for anyone else). Your needs are (it seems to me) too complex for Adobe's automatic system.

  • PRocessing Multiple "Submit" buttons

    I want my JPS to have multiple submit buttons, one for Contineu and one for Cancel. It appears to me that the only way to detect which was clicked in the servlet is pretty inelegantly, something like this:
    if(request.getParameter("continue") != null)
    // do continue stuff
    else
        if(request.getParameter("cancel") != null)
    // do cancel stuffIs this correct? Is there a less cumbersome way? Thanks.

    I will suggest that you write two servlets one to do cancel action and the other to do continue action and through JS call the servlet of cancel or continue.
    that makes your work easier.
    Like this
    <Script language="JavaScript">
    function fn_Perform_Action(chr_User_Action)
                   //-- 2.1) -- ADD a record to database
                   if (chr_User_Action == "Save")
                             var bln_Ret_Val = fn_Check_Mandatory_Fields();                                                       if (bln_Ret_Val)
                                       document.frm_name.action = "/path";
                                       document.frm_name.submit();
                                       return true;                              
                   //--2.3) -- Back to the Menu
                   if (chr_User_Action == "Back")
                                       document.frm_name.action = "/path";
                                       document.frm_name.submit();
                                       return true;                              
                        return false;
    </script>
    <Input Type="Button" Value=" Update " id="id_btn_Save" Name="btn_Save"  OnClick="return fn_Perform_Action('Save');">   
    <Input Type="Button" Value="Back" id="id_btn_Back" Name="btn_Back"  OnClick="return fn_Perform_Action('Back');">
    </Td>          
    </Tr>
    [/code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How do I create multiple TEBs with one submit button on one page in Captivate 7

    I've read other posts on this topic (which refer primarily to earlier versions of Captivate) and am still at a loss as to how to put multiple text entry boxes on a page with one submit button. Here's my scenario:
    I am creating test questions.
    Each test question has multiple text entry boxes (for numbers only).
    Student should be able to enter numbers into the textboxes in any order.
    Then there is one Submit button that should initiate validating all the text entries, and move to a scoring page (so I can test it). (What would be best is if this button not only did the above, but also submitted scores to the LMS.  But that is not my question at this time.)
    I'd like this question to be set up as a template so that I can duplicate it, be able to add or delete text boxes and change the values required in the text boxes.  
    Here is an image of a sample question page with multiple TEBs. The yellow boxes tell the student where they need to enter text:
    Any help or direction to help is appreciated!!

    I think the problem here is that Arlhoolie wants all of the different TEBs to behave as if they were part of a single interaction that submits only ONE result to the quiz.  Using multiple TEBs in Captivate means that you have multiple scored objects and therefore multiple results being submitted to the quiz.
    If you want a single Success or Failure result submitted to the quiz based on the results from multiple interactive objects then there really is no simple way to do it.  But you could try using the Infosemantics Interactive Master widget to combine all the TEBs as slave objects that report to the Master Widget, which then reports a single score to the quiz based on the results from the slave objects.
    You can learn more about the Master widget here:
    http://www.infosemantics.com.au/adobe-captivate-widgets/interactive-master
    http://www.infosemantics.com.au/interactivemaster/help
    You can download a free trial version of the widget here:
    http://www.infosemantics.com.au/adobe-captivate-widgets/download-free-trial-widgets
    One caveat you should be aware of is that this widget is not HTML5 compatible.

  • How to prevent multiple clicks of submit buttons in OAF Pages

    Hi All,
    Our page takes around 30 seconds to 1 minute for processing.
    Some users are not patient enough. I have tried putting the below code in my PR method.
    OAWebBean body = pageContext.getRootWebBean();
        if (body instanceof OABodyBean)
        ((OABodyBean)body).setBlockOnEverySubmit(true);
    This code disables submit button for some time. After few seconds, the submit button can be clicked again by the user.
    Also, if I click on other browser window and come back to OAF page, the submit button can be clicked again immediately.
    Have also searched OAF forum but didn't find any satisfactory answer.
    Need answer from Oracle on this. If not answered on the forum, will raise an SR.

    Hi Amit,
    Try using the Processing Symbol , after clicking the Submit button. Which does shows you processing clock symbol once you click Submit Button.
    Regards
    Raghu

  • Multiple submit buttons in flash form

    I need to make this page so that when the submit button is
    pressed, the action page will be based on the cfforgroup, not on an
    overall form action. Essentially I have 2 main tabs and multiple
    tabs underneath each one of those that need seperate action calls
    on submit:
    <cfquery name="modelinfo" datasource="inventory">
    SELECT cd_manufacturer.name + ' ' +
    model + ' ' +
    processor_type + ' ' +
    processor_speed AS system,
    cd_manufacturer.name + ',' +
    model + ',' +
    processor_type + ',' +
    processor_speed AS val_list
    FROM cd_manufacturer
    INNER JOIN cd_model ON
    cd_manufacturer.pk_manufacturer=cd_model.fk_manufacturer
    </cfquery>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title></title>
    </head>
    <cfquery name="modelinfo" datasource="inventory">
    SELECT cd_manufacturer.name + ' ' +
    model + ' ' +
    processor_type + ' ' +
    processor_speed AS system,
    cd_manufacturer.name + ',' +
    model + ',' +
    processor_type + ',' +
    processor_speed AS val_list
    FROM cd_manufacturer
    INNER JOIN cd_model ON
    cd_manufacturer.pk_manufacturer=cd_model.fk_manufacturer
    </cfquery>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>IT Asset Tracking System Main Menu</title>
    </head>
    <body>
    <cfform format="flash">
    <cfformgroup type="tabnavigator"><!--begin main
    navigation-->
    <cfformgroup type="page" label="Asset"><!-- Begin
    sub page ASSET---->
    <cfformgroup type="tabnavigator"><!-- Begin sub
    page ASSET navigator---->
    <!---ADD ASSET START (uses asset_processes/newAsset.cfm
    for processing)---------------------->
    <cfformgroup type="page" label="Add Asset"
    action="asset_processes/newAsset.cfm">
    <cfset vdate=DateFormat(Now(), "mm/dd/yyyy")>
    <cfinput type="datefield" name="cdate" width="150"
    label="Entry Date" validateat="onSubmit" validate="noblanks"
    required="yes">
    <cfselect
    label="System Type"
    name="modelinfo"
    query="modelinfo"
    required="yes"
    multiple="no"
    display="system"
    value="val_list"
    width="350">
    </cfselect>
    <cfinput type="text" name="location" width="150"
    label="location" validateat="onSubmit" validate="noblanks"
    required="yes">
    <cfinput type="text" name="user" width="150" label="user"
    validateat="onSubmit" validate="noblanks" required="yes">
    <cfinput type="submit" name="submit" value="Create New
    Asset" />
    </cfformgroup><!--end page Add Asset -->
    <!------------END PAGE ADD
    ASSET------------------------------------------------------>
    <!--------------- Assign LotID START (uses
    standard/assignLotID.cfm for processing)--->
    <cfformgroup type="page" label="Assign lotID">
    </cfformgroup><!--end page Assign LotID -->
    <!-----------------ASSIGN LOTID
    END------------------------------>
    <!----------------------Add to surplus
    START--------------------->
    <cfformgroup type="page" label="Add to Surplus">
    </cfformgroup><!--end page add to surplus -->
    <!------------------END ADD TO
    SUPLUS------------------------------>
    <!---------------------------ADD OTHER
    START----------------------->
    <cfformgroup type="page" label="View Inventory (not
    surplused)">
    </cfformgroup><!-- end page "View Inventory (not
    surplused)"-->
    <!---------------------------END
    OTHER---------------------------->
    </cfformgroup><!-- end sub page ASSET--------->
    </cfformgroup><!-- end sub page ASSET
    navigator---->
    <cfformgroup type="page"
    label="maintenance"><!--begin sub page maintenance-->
    </cfformgroup><!--end sub page maintenance-->
    </cfformgroup><!-- end main navigation -->
    </cfform>
    </body>
    </html>

    Here's my code and thanks for your help!
    <!--- begin form --->
    <cfform format="flash" width="850" height="750"
    action="insert.cfm" skin="haloblue">
    <!--- begin tab navigator --->
    <cfformgroup type="tabnavigator">
    <!--- Begin check out tab --->
    <cfformgroup label="Equipment Check-Out" type="page"
    width="600">
    <cfinput type="datefield"
    name="dueDate"
    label="Due Date:" message="Please Select a Valid Due Date"
    validate="date"
    required="yes"
    width="100">
    <!--- Equipment Information --->
    <cfselect enabled="yes" name="equipTag" size="1"
    label="Select Property Tag:" required="yes" multiple="no"
    width="100">
    <cfoutput query="allEquipTag">
    <option value="#equipTag#">#equipTag#</option>
    </cfoutput>
    </cfselect>
    <!--- Person Information --->
    <cfinput type="text"
    name="csulbID"
    label="CSULB ID:"
    message="A CSULB ID is required and must be 9 Digit!"
    mask="999999999"
    required="yes"
    size="10"
    maxlength="9" >
    <cfinput type="text"
    name="fName"
    label="First Name:"
    message="A First Name is required!"
    required="yes"
    size="10" >
    <cfinput type="text"
    name="lName"
    label="Last Name:"
    message="A Last Name is required!"
    required="yes"
    size="10" >
    <cfinput type="text"
    name="phone"
    label="Phone Number:"
    message="Phone Number is required!" mask="999-999-9999"
    required="yes"
    size="10" >
    <cfinput type="text"
    name="email"
    label="Email:"
    message="Email required! i.e. [email protected]"
    required="yes"
    validate="email"
    size="15" >
    <cftextarea name="notes"
    label="Additional Notes:"
    rows="5"
    width="300"/>
    <cfinput type="submit" name="btnSubmit" Label='checkOut'
    tooltip="Submit Check-Out Information" id="btnSubmit"
    value="Submit">
    <!--- end check-out tab--->
    </cfformgroup>
    <!--- start Check-In Tab --->
    <cfformgroup label="Equipment Check-In" type="page"
    width="850" height="700">
    <!--- start data grid--->
    <cfgrid name="equipCheckInGrid"
    query="equipCheckIn"
    selectmode="browse"
    griddataalign="left"
    height="300"
    width="800">
    <!--- Don't show all columns and change header
    name--->
    <cfgridcolumn name="dueDate" header="Due Date">
    <cfgridcolumn name="checkOut" header="Checked Out">
    <cfgridcolumn name="checkIn" header="Checked In">
    <cfgridcolumn name="csulbID" header="CSULB ID">
    <cfgridcolumn name="fName" header="First Name">
    <cfgridcolumn name="lName" header="Last Name">
    <cfgridcolumn name="phone" header="Phone">
    <cfgridcolumn name="email" header="Email">
    <cfgridcolumn name="notes" header="Additional Notes">
    <cfgridcolumn name="equipTag" header="Equip Tag">
    <!--- end data grid--->
    </cfgrid>
    <!--- start input fields--->
    <cfinput type="text"
    name="checkInEquipTag"
    label="Equipment Tag:"
    bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['equipTag']}"
    size="15">
    <cfinput type="text"
    name="checkInDueDate"
    label="Due Date:"
    bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['dueDate']}"
    size="15">
    <cfinput type="text"
    name="checkInCheckOut"
    label="Checked Out:"
    bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['checkOut']}"
    size="15">
    <cfinput type="text"
    name="checkInCheckedIn"
    label="Checked In:"
    width="150"
    value="#DateFormat(now(), "MM/DD/YYYY")#">
    <cfinput type="text"
    name="checkInCSULBID"
    label="CSULB ID:"
    bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['csulbID']}"
    size="15">
    <cfinput type="text"
    name="checkInFName"
    label="First name:"
    bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['fName']}"
    size="15">
    <cfinput type="text"
    name="checkInLName"
    label="Last Name:"
    bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['lName']}"
    size="15">
    <cfinput type="text"
    name="checkInPhone"
    label="Phone:"
    bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['phone']}"
    size="15">
    <cfinput type="text"
    name="checkIneEmail"
    label="Email:"
    bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['email']}"
    size="15">
    <cftextarea type="text"
    name="checkInNotes"
    label="Additional Notes:"
    bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['notes']}"
    width="300"
    rows="5"/>
    <cfinput type="submit" name="btnUpdate" Label='update'
    tooltip="Submit Update Information" id="btnSubmit"
    value="Check-In">
    <!--- end Check-In Tab --->
    </cfformgroup>
    <!--- overdue tab --->
    <cfformgroup label="Equipment Over-Due" type="page"
    width="850" height="700">
    <cfgrid name="equipOverDueGrid"
    query="equipOverDue"
    selectmode="browse"
    griddataalign="left"
    height="300"
    width="800">
    <!--- Don't show all columns and change header
    name--->
    <cfgridcolumn name="dueDate" header="Due Date">
    <cfgridcolumn name="checkOut" header="Checked Out">
    <cfgridcolumn name="checkIn" header="Checked In">
    <cfgridcolumn name="csulbID" header="CSULB ID">
    <cfgridcolumn name="fName" header="First Name">
    <cfgridcolumn name="lName" header="Last Name">
    <cfgridcolumn name="phone" header="Phone">
    <cfgridcolumn name="email" header="Email">
    <cfgridcolumn name="notes" header="Additional Notes">
    <cfgridcolumn name="equipTag" header="Equip Tag">
    <!--- end data grid--->
    </cfgrid>
    </cfformgroup>
    <!--- end tab navigator--->
    </cfformgroup>
    </cfform>

  • Multiple submit buttons in a jsp form?

    I've been doing some research and found out that multiple buttons in a JSP form are possible by two ways:
    - We can obtain the value of the submit button to know which one was clicked in the parameters of the request using the name of the buttons (which should be the same for all the submit buttons).
    - We can change the submit destination using Javascript (Horrible solution since I want my web site to be safe to be used even if Javascript isn't active in clients browsers. I will use it of course since we can do amazing things with it but I want my website to be able to work without it also)
    WHAT annoys me is the fact that the value of a submit button is also his text, so if I change the text of the submit button, I will always have to check the servlet to do the corresponding change.
    Is there a third choice to be able to use multiple buttons?
    Olivier Voutat

    It seem rather convoluted at first but it's really good. I've not worked with JSF so I've no idea how that compares but from what I know, Craig McClanahan, who came up with Struts, worked on JSF also, so I guess it could only improve on Struts.
    EDIT: Here's a search result on Google'ing his name: http://www.theserverside.com/news/thread.tss?thread_id=29068
    But like I said, you don't have to use Struts ( which only uses standard JSP/ Servlets stuff anyway ), you simply use one of the ideas from it.
    For example; you have a properties file, say "/WEB-INF/properties/myProps.properties" with these entries:
    #USERS MODULE
    users.button.save=Save User
    users.button.search=Search User By Name
    users.button.delete=Delete UserThis would be a key: users.button.save to the value Save User
    Now, in your JSP, you use JSTL <fmt> tags:
    <fmt:setBundle basename="properties.myProps"/>
    //set the resource bundle you want to use
    //and create buttons with the proper values
    <input name="myButton" type="submit"><fmt:message key="users.button.save"/></input>
    <input name="myButton" type="submit"><fmt:message key="users.button.search"/></input>This would create buttons with text "Save User" and "Search User By Name" respectively
    Now, finally, in your servlet:
    //create a map of the properties,
    //possibly on app startup using a ServletContextListener
    //and put it in the servlet context for access everywhere
    HashMap myProps = (HashMap)getServletContext.getAttribute("myPropertiesMap");
    String buttonClicked = request.getParameter("myButton");
    if ( buttonClicked.equals((String)myProps.get("users.button.save")) )
    //perform save action
    else if ( buttonClicked.equals((String)myProps.get("users.button.search")) )
    //perform search action
    //etcYou'll obviously want to optimize this. Perhaps make a method that handles the comparison so you can have neater if conditions. But you get the idea, right?
    Edited by: nogoodatcoding on Oct 4, 2007 8:12 PM

  • Can I have multiple submit buttons on the same form?

    Hi!
    I'm creating a web page that allows the user to build a mail filter, and I would like to have to submit buttons, one to add more fields to the filter and another one to save the filter... I could insert the two buttons on the, but I don't know how to distinguish them while doing the process of the form on a jsp page. Any ideas?

    You can create additional submit buttons using Javascript buttons:
    <input type='button' value='Add Fields'
    onClick='this.form.action="/servlet/AddFields";this.form.submit()' />
    <input type='button' value='Save Filter'
    onClick='this.form.action="/servlet/SaveFilter";this.form.submit()' />
    The value of "onClick" is a block of Javascript, so you can all a function to validate the form before submitting, etc.
    Mike W.

  • How to use multiple submit buttons in jsp form

    hello dextors,
    Im using a jsp page which have got some 'n' no submit buttons according to the Iterator ..each iterator display a row contains few fields plus submit button ..ex., If ' n' rows means 'n' respective submit buttons..the problem here is when i click any of the submit button only the value of the first row goes
    to the other jsp page..no matter wat ever button I click only first row goes..
    remember the page displays all the rows correctly and though the values of submit button are also different it gives the same result...
    what could be the reason please help it out...
    my jsp page contains
    <%@ page language="java" import="java.util.*" %>
    <%@ page language="java" import="java.io.*" %>
    <form name="frmChangeCorrection" method="post" target="childwindow" action="popup.jsp" >
    <body>
    <%
    RFTrackerDAOFactory factory = new RFTrackerDAOFactory();
         DailyDataDAO dailyDAO = factory.getDailyDataDAO();
         String month = request.getParameter("month");
         String year = request.getParameter("year");
         String empNo = request.getParameter("empno");          
         Collection coll = dailyDAO.getMonthyEmployeeData(empNo,month,year);
    Iterator iter = coll.iterator();     
    %>
    <div align="center">
    <center>
    <table border="1" width="75%" bgcolor="#B6C7E5">
    <tr>
    <th width="11%">EMPNO</th>
    <th width="30%">EMPLOYEE NAME</th>
    <th width="11%">DATE</th>
    <th width="11%">IN TIME</th>
    <th width="11%" >OUT TIME </th>
    <th width="15%" >TOTAL HRS</th>
    <th width="11%" >MODIFY</th>
    </tr>
    </table>
    </center>
    </div>
    <%
    int count=0;
    while(iter.hasNext())
         EmployeeData data = (EmployeeData)iter.next();
         String str=data.getDuration();
         String str1= str.substring( 0, 5 );
    count++;
    %>
    <div align="center">
    <center>
    <table border="1" width="75%" bgcolor="#B6C7E5">
    <tr>
    <td width="11%"> <%= data.getEmpNo() %> </td>
    <input type="hidden" name="empno" value="<%=data.getEmpNo() %>">
    <td width="30%"> <%= data.getEmpName() %> </td>
    <input type="hidden" name="empname" value="<%= data.getEmpName() %>">
    <td width="11%"><%= data.getDate() %> </td>
    <input type="hidden" name="date" value="<%= data.getDate() %>">
    <td width="11%"><%= data.getInTime() %> </td>
    <td width="11%" > <%= data.getOutTime() %> </td>
    <td width="15%" > <%= str1 %> </td>
    <td width="11%" > <input type="submit" name="Change" value="<% =count%>" onclick="popupResult()" >
    <input type="hidden" name="Change" value="<%=count%>" >
    </td>
    </tr>
    </table>
    </center>
    </div>
    <%
    %>
    </form>          
    </p>
    </table>
    </body>
    <script>
    function popupResult(){
    window.open('about:blank','childwindow', 'height=300,width=300');
    </script>

    It is assumed that one submit button will function for a form..if you want more that one submit form try to build as many forms as u need and put the submit inside that
    that will cure your problem
    and y do you want to create so many submit buttons.. instead you can make use of select button

  • Multiple Submit buttons on one form

    I'm developing an application that will have 4 buttons at the bottom of the form to do various things with the form information. One of the buttons will link to a separate web page for confirmation of the action. I tried to set a global variable and place an onclick event for the button which assigns a specific value for that variable. I then placed a <jsp:forward tag in my code that would be included if the global variable was the specific value which the button changes it to. I"m not sure if I'm being clear here. There is the forms page with the 4 buttons. It possesses all of this code. So the global variable is declared at the top. The variable is set if the 'Delete' button is clicked. And further down there is an if statement used to include the <jsp:forward tag when the 'Delete button has been pressed and this form is again being drawn up.
    What I describe doesn't work. The global variable I guess is reset when this form is drawn up a second time after the 'Delete' submit button is pressed. I''m not married to the way that I'm solving this problem at this point so I'll take any suggestions. But basically I want the Web Forms fields to be sent to this delete jsp so that I can confirm the command to delete the indicated record from the database. The three other buttons on this form are 'Add/Update', 'Rename', and 'Cancel'. The Add/Update and Rename buttons should also be submit buttons but they should link back to the same page as they are located on. The cancel button is to return the user to the index page. I have this working using a document.location.href command in the onclick event for that button.
    Brian

    Hi Brain. If I'm following your thoughts, you may want to consider replacing the four sumbit buttons with four radio control buttons and one submit button.
    I would suggest that you set your form action via a radio control button then, thru the form action, pass the form to a Servlet or JSP that contains some logic.
    <!doctype html public "-//w3c//dtd html 3.2 final//en">
    <html>
    <head>
    </head>
    <body>
    <!-- set your action here to go against a Servlet or JSP.  The
         Servlet or the JSP will contain the logic to Delete, Add/Update, Rename or Cancel
         based on the formAction value.
    -->
    <form action='ServletOrJSPNameHere' method='post'>
    <br> <input type='radio' name='formAction' value='Delete'>Delete
    <br> <input type='radio' name='formAction' value='Add/Update'>Add/Update
    <br> <input type='radio' name='formAction' value='Rename'>Rename
    <br> <input type='radio' name='formAction' value='Cancel'>Cancel
    <br> <input type='submit' value='submit'>
    <form>
    </body>
    </html>
    // this code would go into your Servlet, JSP, or worker class
    String formAction = request.getParamger("formAction");
    // test for null value  
    if ( formAction == null ) { 
         // reload the page with a message to pick a radio button
    else if ( formAction.equals("Delete") {
       doTheDeleteProcessing();
    else if ( formAction.equals("Add/Update") { 
       doTheAdd/UpdateProcessing();
    else if ( formAction.equals("Rename") {
       doTheRenameProcessing();
    else {
       doTheCancelProcessing();
    }I hope this helps.

  • Submit Button and New Pages

    Hello all~
    The questions i have may be too complicated for this forum,
    but as I'm struggling desperately, I thought I'd give it a try.
    I bought a premade site almost a year ago, and I managed to
    update it myself, but I've never been able to get the submit button
    on the contact form to work. The reset button works - without any
    help from me, but nothing happens when the submit button is
    clicked. I'm trying to rekindle my business and so am in need to
    update the site, but I can't seem to figure these things out.
    Second problem, I need to rearrange some of the pages and
    also add new ones, but I tried adding a new page, and can't figure
    out how to find the number of the pages that I add. The
    actionscript looks like this:
    on (rollOver) {
    if (_root.link != 7)
    gotoAndPlay(2);
    on (releaseOutside, rollOut) {
    if (_root.link != 7)
    gotoAndPlay(11);
    on (release) {
    if (_root.link<>7) {
    _root.robot.play();
    _parent["b"+_root.link].play();
    _root.link = 7;
    _root.play();
    How do I know what the root.link is for any given movie clip?
    If any of that makes sense to anyone, please email me or
    reply. I am frustrated beyond belief!!
    L. Monique

    the movieclips are name b1, b2,... etc and, if your buttons
    are movieclips, they are on the timeline that contains your
    movieclip buttons and, if your buttons are true buttons, they are
    on the parent timeline of the timeline that contains your
    buttons.

  • Multiple submit button on a single form

    hi all,
    My current system have 1 submit button with single form. This submit button will call file_content.upload.
    htp.p('function on_submit() {');
    htp.p('     ...the rest of my code here..');
    htp.p('     document.forms[0].submit();');
    htp.p('     return true;');
    htp.p('}');
    htp.p('<form enctype="multipart/form-data" method="post" action="file_content.upload">');
    htp.p('     ...the rest of my code here..');
    htp.p('<input type="button" id="btn_Submit" value="Submit" onclick="on_submit()"></form>');
    My question is, i want to enhance this by adding additional 1 submit button with value "Save". But this new "Save" button will call/trigger different file. This new button will call file_content.update. How to accomplish this and how to differentiate these 2 button?
    htp.p('<input type="button" id="btn_Submit" value="Submit" onclick="on_submit()"> 
    <input type="button" id="btn_Save" value="Save"></form>');
    Appreciate any help from you guys. Thanks
    Edited by: morezack on Jul 20, 2011 8:21 PM
    Edited by: morezack on Jul 20, 2011 8:29 PM

    PLEASE IGNORE THIS THREAD. ACCIDENTLY SUBMIT IT. I WANT TO DELETE THIS BUT CANNOT

Maybe you are looking for

  • ITunes no longer lets me display multiple pieces of artwork attached to the same song.

    I have scanned the covers, the backs, and some of the liner notes for most of the songs in my 38,000 song library. Earlier versions of iTunes diplayed small arrows in the frame above the artwork viewer in the main window whenever more than one piece

  • [SOLVED] Watermark Desktop

    Hello, Is there a package which watermarks the desktop with useful information such as your username/IP etc?  I believe "WaterMark" does this but I can't get it to work. Thanks. Last edited by RAH (2008-07-13 22:55:50)

  • Sharing photos on PC and MAC?

    I am new to MAC (3 months.) I now know that having both managed and referenced libraries in iPhoto and/or renaming or touching anything in the iPhoto libray itself is BAD! Before I fix what I have done, I want to make sure my ging forward strategy wi

  • Funktion to create MM Scheduling agreement

    Dear all, I am looking for a funktion/bapi to create material scheduling agreements in SAP. I think BAPI_PO_CREATE1 does only create purchase orders. Any ideas how to create scheduling agreements by funktion? Kind regards Roman

  • ORA-01841 Converting SQL Server DateTime to Oracle Date

    I have Oracle 11gR2 x64 running on my Win7 Enterprise x64 personal system. I'm trying to convert the TSQL to create a database in SQL Server 2008 Express for my C# class to Oracle, and I've run into a "interesting" problem loading date data. The SQL