Single form Multiple Actions based on button click

Hi,
I have to call two different actions based on button click from single <form > .
How to achive this?.
Thank you

Hi,
I am using struts <html:form> and my code is as follows
<script language="javascript">
          function setAction(val){
     if(val==A){
               window.open(document.forms[0].action="preview.do");
     }else if(val==B){
     document.forms[0].action="create.do";
          document.getElementById('fcreate').submit();
</script>
<html:form action="/create.do" >
<html:text property="name">
</html:form>
action is mandatory for <html:form>
Its not sending the form elements, when I click the preview button.
Create button works fine. In struts-conig, I have taken same form name for create and preview actions
Please give me some tips
Thank you

Similar Messages

  • How to open multiple report windows on button click without losing session?

    Hi,
    JDev : 11.1.1.2.0
    I am trying to open multiple discoverer plus report windows using my ADF application.
    My requirement is that user has to select multiple reports from the screen and by clicking on submit button all the reports should be opened in different windows.
    1) Below link provided me the the first solution but I can't go with it because my page is jsff and in jsff it doesn't support form tag.
    http://andrejusb.blogspot.com/2007/07/opening-report-window-in-adf-faces.html
    2) RichGoButton also provide targetFrame property but there is not action property in it so I can't call backing bean method with RichGoButton
    3) I have tried to open report windows using javascript window.open with ExtendedRenderKitService but on discoverer side it giving error message that Discoverer Plus cannot attach same session to multiple request.
    4) I have created one jsp page in the same folder where my jsff is kept in my ADF application and on submit button click I have launch this jsp page using afConetxt.launchDialog and in jsp scriplet I have written response.sendRedirect to report url but here all report are getting open properly to seperate windwos but my ADF application session is getting timeout so after clicking on submit button it will automatically goes to login page it cann't stay with the current page.
    Hoe you have understnad my problem and please provide me if you know any other solution aprart from above mentioned 4 solutions
    Regards,
    DevD

    sURL is query parameter value that I want to pass on jsp page. It is used to set some value on jsp page.
    If this is not a right approach then let me know how to pass the parameter in jsp page.

  • Hide/Show a graph based on button click .

    I have to show a graph based on the values selected in the shuttle . The graph should be drawn only when a button( "Show graph") is clicked . My question is
    1) If the set the button's action to submit, it resets and empties the selected values in the shuttle . How do I prevent that ?
    2) How do I make the graph appear and disappear based on the button click ( Like a toggle button ) ?
    3) As I can draw the graph only from the values selected in the shuttle , the query parsing fails . However , the graph displays when the shuttle get populated with selected values . Is there a way to get around that .
    Thanks for your help .

    There is nothing wrong with your code, so I'd look elsewhere for the problem. Is this a direct copy of what you have on your page?
    :P1_COMBO1 in ('Option 1', 'Option 2')
    And
    :P1_COMBO2 = 'Option Combo 2'And the page item values are exactly as you have in the quoted strings? You might run the page in debug and confirm the page item values are exact.
    Edited by: Bob37 on Dec 6, 2011 2:18 PM

  • Download the PDF Form as a attachment when button click in BSP application

    Hi All,
    I have scenario, when button click in the BSP application PDF Form want to download in the IE (like one window open with Open,Save and cancel button).
    I have written this code:
    data: pdf type fpformoutput-pdf.
    < Logic for populate value to pdf field ....
    .>
    response->set_header_field(
                         name  = 'cache-control'
                         value = 'max-age=0' ).
      response->set_header_field(
                         name  = 'content-disposition'
                         value = 'attachment; filename=webforms.pdf' ).
      response->set_data( data   = pdf ).
    Once button is clicked pop up is opened and closed automatically because of browser or adobe reader issue.
    How can I resolve this problem ?
    In the IE i need to change any settings ?
    IE version = 7.0
    Adobe reader = 9.0
    I have tried in the same code with IE = 6.0 and adobe reader 8.1.2 its getting download the pdf form working fine.
    The same think i want in IE 7.0 and adobe reader 9.0, what needs to be done ?
    Regards,
    Boopathi M

    Hello Ravi,
    Best would be to bind the dataSource of the InteractiveForm ui element to the parent node containing the table's data. Then specify a name of a template to be created in the templateSource and hit <enter>. Some popups later, the system will have created a template from the structure of the context. All you need to do now is to drag&drop the data structure inside the template designer to the template itself. This will result in a table. Save, activate and return the Web Dynpro view. Don't forget to unbind the pdfSource and enjoy.
    Best regards,
    Thomas

  • Perform multiple actions with one button

    Is it possible to do 2 things when clicking a single button?
    Like this:
    A button adds an item to a collection and after adding the button must be disabled.

    Yes - you can chain multiple commands together with a ;
    In this example, add a button control (Button1) and an Input Text (Text1) control.
    Set the OnClick property for Button1 to:
    Collect(myCollection, {FirstName: Text1!Text}); UpdateContext({ButtonDisabled: false}); UpdateContext({ButtonDisabled: true})
    Set the Disabled property for Button1 to:
    ButtonDisabled
    FYI - The UpdateContext is used twice to change the state of a context variable.
    Let us know if this answers your question -
    Thor

  • Focus on an Item (based on button click)  in OAF page

    Hi,
    I am new to OAF. I face an issue in a OAF page. The page has got 'message input text fields', 'Apply' and 'cancel' button. Once the page is rendered , there is no initial focus on any item. If i click on the page or use tab to navigate to a text field , the focus moves to the 'Apply' button (by default). The real problem is, even before entering the details , if i accidentally press the *'ENTER'* key , the apply action is triggered(where the focus relies).
    1. I just need to find out why the focus moves to the particular button item , when i click on text box or anywhere in the region.
    2. Is there any mouse event mapped to the page or that item ?
    3. I don't want that focus to be on any button (when i click in the page region or place the cursor in text box to enter values).
    How to achieve this?
    Is this can be done using personalization or its has to be looked up in the CO of that page.
    Please help me on this.
    Thanks and Regards,
    Raghav

    Hi Gaurav,
    Thank you so much for your quick response.That page has got a custom CO which got extended from another main CO . I need to add this code in the processRequest() of the main CO for that particular PG or in this custom CO. Correct me if i am wrong.
    Thanks and Regards,
    Raghav

  • Two actions on one button click

    Hi All,
    I have one button that I want to do two things. When I test
    the movie I have to click on the button twice to make both actions
    happen. Is my machine on drugs or is there something I'm missing?
    Here's the AS I'm using on the button.
    on (release) {
    gotoandStop(2)
    on (release) {
    holder_mc.loadMovie("my_movie.swf",1);
    Thanks for any help,
    Mike

    on (release) {
    gotoandStop(2)
    holder_mc.loadMovie("my_movie.swf",1);
    }

  • Show/ Hide region based on button click

    Hi,
    I have two report regions. When I press generate report button then, one region has to be displayed.
    I have an item "select list with submit " and if select some value from the LOV in the select list then the second region has to be displayed. Over all only one region has to be displayed at a time.
    Thanks in advance.

    See this thread for a possible answer: Hide/Show Region With Javascript
    Thank you,
    Tony Miller
    Webster, TX

  • Issue with Opening Files using Multiple Actions

    I've noticed a strange issue when I attempt to use multiple actions in my Captivate 4 project.
    I have a button that does two things: open an HTML file in another window and make another button visible. Of course, for the Open URL or File action, I'm entering the name of the HTML file and select New from the drop-down list so it opens in a new window.
    Captivate doesn't seem to store that setting. When I click OK for that dialog box and then OK for the button dialog box, it reverts back to Current.
    Is this a bug or am I doing something wrong?
    Here I am, setting the property...
    ...and here's me checking Captivate 4 to see if the setting "stuck" and seeing that it didn't:

    Hi there
    I've recently encountered that behavior myself. I found it was a lot more reliable to avoid using the Multiple Actions for the Button click. Instead, configure an Advanced Action to do the work and you should have better results.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • How to submit data from multiple Input Ports in single SUBMIT button  click

    Hi,
    I am in SPS8.
    What exactly steps I need to perform to submit data from multiple Input Ports.
    I couldn't able to submit One input Form and one Input Table to BAPI data service in single SUBMIT button click.
    I debugged the VC application in SPS8.
    While debugging, I found that when I click the SUBMIT button in the Input Form, Only data in that Input
    form are being passed to the BAPI, But not the Table Form data.
    If I click on the SUBMIT button in another Input Table, Only data from that table is being passed to the BAPI, but not the Input form data.
    Essentially I need to submit both of them in one SUBMIT button.
    Thanks,
    Ramakrishna

    Ramakrishna,
    From the word document that you sent to me the steps you are missing to map the appropriate information into the BAPI is first you are not mapping all data rows into the table input port. To do this double click on the input table view and change your selection mode from single to multiple. Then when you click on your link between the BAPI and your input table you will see a new option appears under data mapping "Mapping Scope" select All Data Rows.
    That's the first part of the problem to get the BAPI to recognize both the inputs coming from the form and the table eliminate the submit button from the form. Drag and drop a link from the output port of the table view to the Input port of the BAPI. Double click on the link between the BAPI and the table view and open the expressions editor for the two fields:
    1/ Automatic Source
    2/ SKIP_ITEMS_WITH_ERROR
    On the hierarchical folder structure on the right expand expand the Data Fields node to find the fields from the form and map them accordingly.
    Now when you hit the submit button on your table it should pass the BAPI all the parameters from both the form and the table.
    Hope this helps,
    Cheers,
    Scott

  • How to generate .xls file on a button click in Forms 10g

    Hi
    I am using forms 10g.
    On a button click I want to generate a .csv or .xls file (data in these file should be fetched form database).
    Could you please tell me how can I do this?
    Regards

    Hello 576726,
    where do you want to store the file?
    On the client? If it uses Windows as OS and has Excel installed you can use CLIENT_OLE2, otherwise you can write files using CLIENT_TEXT_IO.
    On the server? You can use utl_file or a package that allowes to write formatted/multiple worksheets like
    https://xml-spreadsheet.samplecode.oracle.com/ or
    https://exceldocumenttype.samplecode.oracle.com/
    Another solution by Friedhold Matz is linked at Re: Gride in Oracle Formns 6i
    Regards
    Marcus
    Edited by: Marwim on 17.11.2010 07:18

  • How do I have the learner perform a conditional action based on a button selection?

    The learner needs to select a checkbox on the screen of a performance exercise.  I've put the widget in for the checkbox and it works fine.  After the select the checkbox, they need to select OK on the screen to move them onto the next screen.  However, I don't want the learner to just select OK without selecting the checkbox in order to replicate the sequence correctly. 
    I have a slide which shows the message  which tells them as to what they did wrong when they select OK without checking the box, but when I tie that to the correct response, it will go there whether they select the checkbox or not.
    I've tried adding multiple actions to the button, which doesn't work, becuase the OK button has to be tied to the learner conditionally selecting the checkbox to move on to the correct slide.  If I use multiple actions, and the first action is to SHOW  the slide with the incorrect message, if they correctly check the box and then hit OK, it will first SHOW them the incorrect slide.
    I think what I need is a variable and then add an advanced action with a conditional statement.  However, I don't really know how to do that.  Here's the variable I created, but I don't know what value I should assign.  Here's the screen shot of the variable and conditional statement.  Could someone tell me how to do the variable and the conditional statement so that the learner when selecting OK WITHOUT selecting the checkbox first will be redirected the the error slide and if they select the checkbox FIRST, and then OK, they move on to the next screen?  Thanks,

    Thanks, you definitely got me started on the right track on variables and advanced action statements.  The screen shots helped.
    Here's how the actual fix went to make sure the OK button on the screen had a conditional statement attached to it, with
    an advanced action:
    I created parameters for the widget to link to the variable:
    I created a variable:
    Then I created an advanced action conditional statement for that variable which enabled the button to advance to the next slide when the clickbox was checked:
    Then where I finally realized my final mistake was not setting the button properties to execute advanced action:

  • Open system form on button click

    Hello Expert,
    How to open system form(invetery transfer from) on button click
    Regards,
    Abhinav Lalpurwala

    Hi Abhinav
    Try This.....
    'In Button pressed event
       sbo_application.ActivateMenuItem("3080") 'For Inventory Transfer form
    Thanks
    Shafi

  • How to generate barcode on button click event in PDF using adobe livecycle?

    I already created form in PDF file which is validate completely .But , I required generate a barcode of all field of form using custom script on button click event.
    Please give me right way for doing it .
    Thanks in Advance,
    Jaydeep Solanki.

    Hi vijay,
    What project are you doing? Is it Asp.Net project? If so, you'll need to post it in the dedicated ASP.Net Forum
    http://forums.asp.net  for more efficient responses, where you can contact ASP.NET experts.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • URGENT-Simulate GOTO option as a button click

    Hi Gurus,
    We would like to JUMP from first query to second query, maintained all the sender and receiver settings in the RSBBS. It is working when we select the characteristic and right click and select GOTO. But the user doesn't want to do the right click and goto.
    He wanted to have that action as a button click. Please help simulating that action as a button click
    Thanks,
    Raj.

    To my knowledge you need a lot of javascript coding in WAD for this for calling the Reciever Report amd passing the variable parameters. because this functionality is not possible through RSBBS

Maybe you are looking for

  • Error : Bigger type length than Maximum

    Hi I am using JBOSS Server-with ORACLE 10g-xe(express edition),Thru prepare statement it works well,But thru callable statement it is not working .I am getting the following error Bigger type length than Maximum . I am using jdbc:oracle:thin@host_nam

  • When I open gmail in Safari it opens to the spam tab. Can I change this to the Priority tab?  How?

    I would prefer to use Safari, but have a problem with it in connection to gmail, my preferred mail account.  When I open gmail in Safari it always goes directly to the "Spam" tab in gmail.  (I have three gmail tabs for sorting mail:  Priority, Social

  • Change Date-Time format through derived column

    Hi, I have Date in MM-DD-YYYY Format & Want to convert it to YYYY-MM-DD format through derived column. Can anyone help with the expression required for the conversion.??? Thanks.

  • Transaction in progress

    Oracle SQL Developer version 1.1.2.25 BUILD MAIN-25.79 Running under WinXP Issue description: There is nothing telling that a transaction is in progress.

  • Plz reduse the f8 time

    dear all, in my internal order report i have this select query. in debugging i obserd that select sum( wkgbtr) is taking more time .how to make it fast .plz advise me. in o/p i need to present the values of sum (whgbtr) for present yer and previous y