Execute query when submit button

Hello, everybody.
In my application I' ve 3 multiselect list and one button 'GO'.
I would want after to have selected the values click on 'GO' and to execute one query. The result of the query would have to be visualized in a report under the 'GO'.
I am using 'Reports region' Template.
Is this possible and as I can make it?

Moh Loay wrote:
i am using dynamic action to set value so the page refresh and the report refresh also Your statment it not clear, usually Dynamic actions are used to AVOID entire page refresh. In your case you say that is refreshes that page!!
What you should do is :
- Add dynamuc actions ONLY to populate cascading LOVS.
- Add a "go" or submit button that simple submits that page.
- Make sure your LOVS are not select lists with submit option.
Hope This Helps,
Sam

Similar Messages

  • Display success message in same page when submit button is clicked

    I have a jsp page, where i use a form to submit data into my database.when submit button is clicked, i am able to display "Data entered Successfully" in a different page. But i want to display the message in the same jsp page.
    what do i do?
    PS :- i have tried a javascript message box, but that is not working properly. I need this solved urgently.
    Thanks

    Hi Deeptha,
    What is APEX version your using and is it your select list with submit option ?
    Regards,
    Ajay Periwal

  • New to Flash, create a flash form which is emailed using CGI script when submit button is pressed

    I'm trying to build a form in flash that is emailed using CGI
    script. I'm just lost and confused and I just can't seem to figure
    this out.
    This is the CGI coding for HTML and I just need to convert it
    to use in CS3:
    <form action="
    http://www.hostmonster.com/monstermail"
    enctype="multipart/form-data" method="POST">
    Name: <input type="text" name="Name"><br>
    Email: <input type="text" name="mailfrom"><br>
    Phone: <input type="text" name="Phone"><br>
    Service: <input type="text" name="Service"><br>
    <input type="hidden" name="sendtoemail"
    value="[email protected]"><br>
    <input type="submit" value="Send Email">
    </form>
    This is a link to what I'm working on:
    http://www.alternativesolutionsforyou.com/contact.htm

    OK, sorry....no more errors when I test the movie but when I
    test it live....nothing happens???? Here's the link again:
    http://www.alternativesolutionsforyou.com/contact.htm
    Code as it is:
    lv=new LoadVars();
    lv.Name=name.text;
    lv.mailfrom=email.text;
    lv.Phone=phone.text;
    lv.Service=service.text;
    lv.sendtoemail="[email protected]"
    yourSubmitButton.onPress=function(){
    lv.sendAndLoad("
    http://www.hostmonster.com/monstermail",lv,"POST");
    lv.onData=function(){
    // data successfully sent
    // this will execute if your cgi script returns something
    after executing
    I haven't adjusted what happens after you his the submit
    button yet.....just trying to get the email working.

  • Execute query when post text item

    Anybody can help ?
    I create 2 block, first a data block and another is a control block with field customer_search field,
    after inputing customer id in search field on control block,
    I want to execute query.
    my code :
    set_block_property('customer',default_where,'custid=:control.customer_search');
    execute_query;
    error : frm-407 : illegal restricted procedure execute_query in post-text-item trigger.
    How to solve this problem ?
    notes: If I create one push button and put execute_query in there, every thing is fine.
    but the my user does not like that.
    Thank.

    hi,
    first of all change ur statement as
    set_block_property('customer',default_where,'custid='||:control.customer_search);
    means u must use pipe sign while using bind variable
    secondly
    u should use key next item trigger
    go_block(user desired item or block);
    --and then use this satemant
    clear_block(no_validate);
    execute_query(no_validate);
    i hope it wil slove ur peoblem if it will NOT then please acknowledge otherwise we will go for a other solution
    thanks
    imran
    manager IT
    www.masoodtextile.com

  • Trigger to execute query when value from LOV is selected

    HI Guys,
    I have a form in which I have 2 fields in Master and 4 fields in detail, all showing on the same canvas.
    I have put an 'execute_query' in when_new_form_instance trigger so that when I open the form it is pre - populated.
    The Master fields draw values from LOVs. I want to execute the master block query when the user selects a value from LOV, so in which trigger should I put it.
    I have tried in 'when_validate_item' and 'when_list_changed' triggers but it is showing an error.
    So, what should I do?
    Regards
    Ranjan

    I have designed a form in which there are two items in header level and two in line level. I have defined master - child relationship between the two blocks.
    I have put a execute_query for header in when_new_form_instance trigger so that when user opens the form, all fields are initially populated.
    Each Field has an LOV attached to it.
    Form Outline :
    Header : Ledger Name
    Ledger_approver
    Line : Approver
    Amount
    Initially all details for Ledger L1 is populated.
    If the user now selects Ledger L2 from LOV, then when he moves out of that item, immediately all details about L2 should get populated in the fields.
    I Have tried execute_query in when_validate_item of Ledger Name but I get error that we cannot use restricted procedure in when_validate_item trigger.
    I hope this explains my issue.
    Regards,
    Ranjan

  • New window everytime when submit button clicked in JSF

    Hi all,
    I am facing an issue where I need to popup a new window everytime the submit button on my JSF form is clicked.
    I have tried several methods but none is working to my purpose.
    1. Add a target="_blank" attribute in the JSF form. The problem is that even if any of my ValuechangeListeners get invoked, the page is rendered in a new window. My ValuechangeListeners work on onchange="submit()".
    2. Invoke a new window from javascript and name the window as say" new" . Also name the form's target as "new" but this does not generate a new window everytime and also problem 1 persists.
    3. If i use actionlistener and onclick event on button in the form, then the new page is rendered in both current page and new window.( javascript for new window is written).
    What I need is when a person clicks on submit button in the form, a new window should always popup up and the page should be rendered in the new window. The original form should remain as it is so that a user can again do a submit and get a new window.
    Please suggest.

    devayani wrote:
    Thanks all for the replies.
    Try onchange="this.form.target='_self';submit();"This works fine if all the valuechangelisteners are invoked. Suppose,if I dont select the radio
    button and dont select any values in list box. Now if i click submit, since the target=_blank,
    the page giving validation errors (for not selecting the list box)
    renders in a new page. As expected behavior, not my solution.
    If you need validation to remain in the same window (and that seems like the best for the user experience you have described), then delay the creation of the new window until after the request finishes. I.e., your page should always go back on itself. Under the right conditions (which you can set in your action method) it conditionally writes JavaScript which targets the new window.
    >
    Try returning false from the onclick event.I had tried it long back, so I just messed it up while writing, there were no actionlisteners.
    sorry about my third solution, lets consider solution 2 as below:
    Javascript
    <script type="text/javascript" >
         function newWindow(){
              window.open('','mywindow','width=400,height=200');
              return false;
         </script>
    JSF
    <h:form id="Frm_New" target="mywindow">     
    <h:commandButton id="btn_submit" disabled="false"             
                  action = "#{TestBean.submitValues}"
                  value="#{bundle.SC_SUBMIT}"
                  onclick ="newWindow()">But again this approach has above problems and also no new window everytime. For new window you said:
    Append a time stamp or random number to
    the end of the window name.This solution will not work as I have to reset the target for my form everytime to this new window name.You can remember the name of the window if necessary. Although you seem to be changing things on the fly; earlier the problem was you didn't get a new window every time. Or are you just confused on how to set the target?
    onclick="var wname = getWindowName(); createNewWindow(wname); this.form.target = wname; return true;">
    I was trying to actually set the target of the form as _blank at runtime during one of the phases of JSF lifecycle ( by using phaselistener). Although its not working as of now. Does this sound a good approach
    This is because I dont think that setting it on jsf would work as the page rendering on a new window( in my case) not only depends on clicking the submit button only but it depends on whether the user is done with all vaildations and now has to see the final result into new window.This would be addressed by the conditional JavaScript solution above.

  • Script to validate a field when submit button pressed not working

    I have a script to validate certain fields and generate an error message if fields are blank or not filled out correctly. Everything works fine except for one of them. I'm trying to generate an error message if one of the fields have an invalid format in it. For example, the format should be ''XXXX.XX'' (all numbers) so if they enter ''XXXX'' the error message will generate and the form will not submit. I have a function setup under this particular field and it works but unfortunately users are ignoring the error message and submitting the form anyway and this field really needs to be right before it's submitted.
    This is what I'm using for it:
    var bCancel = false;
    var strMsg = "";
    if (getField("Tracking").value == /^\d{0,4}(\.\d{0,2})?$/) {
    bCancel = false; }
    if (getField("Tracking").value != /^\d{0,4}(\.\d{0,2})?$/) {
    strMsg = "Invalid Format. Please correct before continuing. (EX: 0000.00)";
    bCancel = true; }
    So the problem is it generates the error message now even if the format is correct. I'm sure I did something wrong but I wrote the format the same way (/^\d{0,4}(\.\d{0,2})?$/) when I ran a custom format script under this field and it worked fine so I'm not sure what I'm doing wrong. I'm also including this part of the script with the rest of the field validations in the submit button. So altogether it looks something like this (just with a lot more fields, didn't include all of them bc it gets pretty redundant)
    var bCancel = false;
    var strMsg = "";
    if (getField("Tracking").value == /^\d{0,4}(\.\d{0,2})?$/) {
    bCancel = false; }
    if (getField("Employee Name").value >= 1) {
    bCancel = false; }
    if (getField("AcctNbr1").value >= 1) {
    bCancel = false; }
    if (getField("Tracking").value != /^\d{0,4}(\.\d{0,2})?$/) {
    strMsg = "Tracking field format is invalid. Please correct before continuing. (EX: 0000.00)";
    bCancel = true; }
    if (getField("Employee Name").value == "") {
    strMsg="At least one required field was empty on export. Please fill in the required fields (highlighted) before continuing.";
    bCancel = true; }
    if (getField("AcctNbr1").value == "") {
    strMsg="At least one required field was empty on export. Please fill in the required fields (highlighted) before continuing.";
    bCancel = true; }
    if (bCancel){
    app.alert(strMsg);
    } else {
    this.mailDoc({
    bUI:       true,
    cTo:      "[email protected]",
    cSubject: "Form Returned: Maintenance Form"});
    I'm fairly new to scripting, especially in Adobe, so I probably didn't do a great job with all of it. Please let me know if there's anything I need to change to get it working better. Thanks in advance for your help!

    OK, below are two regular expressions that may do what you want:
    var re1 = /^\d{4}\.\d{2}$/;
    var re2 = /^[1-9]\d{3}\.\d{2}$/;
    The first, re1, will match any four digits, followed by a decimal point, followed by two digits. A potential problem with this is it will match a string like "0001.23", which may not be what you want. If you don't want it to match a string with leading zeroes, you can use the second one, re2. It will match any digit from 1 to 9, followed by any three digits, followed by a decimal point, followed by two digits.
    The test method of a regular expression takes a string as an argument and will return true if it matches the regular expression, or false if it doesn't. Here are some example outputs given various field values and methods of getting the field values:
    // Text1 field value is 0123.45
    // Get the field value.
    // The variable num will be a number, not a string
    // num will equal 123.45
    var num = getField("Text1").value;
    // Test regular expression against num
    bOK = re1.test(num);   // returns false
    // Now get the field value as a string
    // num will equal "0123.45"
    var num = getField("Text1").valueAsString;
    bOK = re1.test(num);   // returns true
    // Now use the other regular expression
    bOK = re2.test(num);  // returns false
    // Text1 field value is now 1234.56
    // num will equal "1234.56"
    var num = getField("Text1").valueAsString;
    bOK = re2.test(num);   // returns true
    To summarize, if you want to not allow leading zeroes, get the field value using the valueAsString field property, and use a regular expression that does not match a leading zero. You should probably change the regular expression you're using in the Keystroke script if you want to prevent the user from entering a number with any leading zeroes.

  • Try to debug the query when save button pressed

    Hi, could some body tell me how can I see the SQL statement when the trigger is executed. I have a save button, when it is pressed it does a commit to insert data to database. I would like to see a sql statement something like : "insert into xxxx (xxx,xx,...) values (xxx,xx,...). I checked the System.last_query but it still shows the select statement to get into the form. Not the actural LAST STATEMENT. please help!

    Hi!
    If you commit the form and insert data after that,
    that data will not being commited to the database and got lost until you use
    something like forms_ddl ( 'commit' ); after the insert.
    :system.last_query, which is the very last query of a block in your form,
    will never show an insert in any trigger.
    May a commit-trigger is not a good place for an insert.
    But anyway, hope this help you.
    Regard
    Stauder

  • Adding a Warning dialog box when submit button click

    Having troubles figuring out how to add a warning dialog when user click submit asking if he would like to proceed if a column field is null.

    Umm is it possible to do this with validation on submit and cancel the process mid way. if they hit cancel.
    Because data may be deleted in the database or change if i don't do it upon submit.
    E.G i kind of want to achieve something like this but i'm very unsure if it's even possible call a validation?
    boolean isValid
    isValid = call validation_name
    If isValid = false THEN
    javascript:if(confirm('Are you sure?')){doSubmit('P5_SUBMIT');}
    else
    javascript:doSubmit('P5_SUBMIT');
    END IF;Edited by: PandaOracle on Jan 24, 2012 10:19 AM

  • When-Validate-Item and Go_Block/Execute Query dilemma

    Hey there folks -- Probably not a surprise question on this forum. I did try to search for this and came up with a few posts but did not find any solutions. Hopefully, I was also doing the correct way to search on this forum. If this is a post for the nth time on this issue, I apologize.
    So, I have 2 blocks:
    1. Control Block that contains the STUDENT_ID field (Database Item = 'N')
    2. Database block that contains the STUDENT_ID field (Database Item = 'Y' and many other fields)
    My goal is do an Execute_Query if User enters the Student ID and either presses TAB or places the MOUSE in the database block and display the record if it exists. As we know, a Go_Block is not allowed in When-Validate-Item. So, I went one step further to "simulate" this. The problem is that I am still firing the Execute-Query when the record has already been retrieved. Here is what I have so far. So, the Key-Next-Item trigger works fine if User enters a Student ID and presses tab. It also works fine if User clicks on the STUDENT_BK as the When-New-Block-Instance trigger fires which in turn calls the Key-Next-Item. The problem occurs when after record has been retrieved and User clicks on control.student_id and then comes and clicks on the STUDENT_BK, the KEY-NEXT-ITEM trigger fires again.
    Suggestions or pointers would be more than welcome.
    Thanks!
    CONTROL.student_id.Key-Next-Item
      if :control.student_id is not null and :SYSTEM.BLOCK_STATUS != 'CHANGED' then
        next_block;
        clear_block(NO_COMMIT);
        execute_query;
      else
        show_alert('Please enter Student ID');
      end if;
    STUDENT_BK.When-New-Block-Instance
    go_item('control.student_id');
    do_key('next_item');

    Yeah... I wrote before I tried it out. The GET_ITEM_PROPERTY('ITEM', previousitem) didn't work the way I thought it did. After I posted that, I tried it out and it was a complete failure.
    I guess what I am thinking now, is in your STUDENT_BK block, do you only want to EXECUTE_QUERY if the :STUDENT_ID does not match the :CONTROL.STUDENT_ID? If that is true, then all you would have to do is to change your KEY-NEXT logic to include the
    if STUDENT_BK.STUDENT_ID != :CONTROL.STUDENT_ID then
      -- original logic
      go_item('control.student_id');
      do_key('next_item');
    end if;The more I think about it, this should work for you. You said that you had two requirements: Entered a student id in the control block and tabbed or entered the database block. If you add the check of the student id then that should take care of your second requirement. If they enter the database block and the id's don't match then it will execute the query, else they already have the record displayed for them so you don't need to do anything.
    Edited by: MLBrown on Nov 19, 2012 3:08 PM

  • UIX Edit Search Criteria Submit Button operation

    When drag-drop a “Search Form” from a data control onto a UIX page JDeveloper will automatically wire up an “Edit Criteria” section. Inside this section is a <labeledFieldLayout> with search attributes and a <submitButton text="Submit"/>.
    This submit button has no event associated or defined for it. So, what code is really getting executed here when this button is pressed?
    I would like to replicate the actions that are occurring when pressing this button in a separate event in the event handlers section of the UIX page.
    Any help or even examples would be greatly appreciated.

    Hooray, I figured it out!
    The trick to this is pretty simple. This particular view object has a query that can ONLY be executed with parameters. The query was getting executed BEFORE the parameters had been set with values from the session scoped managed bean. So, of course, it was failing. In the pagedef there is an iterator referencing the VO, and an invokeAction referencing the ExecuteWithParams method of that VO.
    All I had to do was set the Refresh attribute of the iterator to "deferred", and the Refresh attribute of the invokeAction to "ifNeeded". That way, the iterator doesn't execute the query, but the ExecuteWithParams does.

  • Calling a method with a html Submit button

    hi guys,
    is it possible to call a method from a JSP file using a HTML submit button. I know i can call another website easily doing it this way, is there a similar way available to call a method once the button is clicked?
    FYI
    The method is in a bean file named jdbc. The methods name is getUsername.
    Nice one.
    <form action = <%jdbc.getUsername()%> <input type="submit" value="Submit">

    Dear friend,
    you mentioned that u need to call a method when submit button is clicked. Is the method dynamically created. If not so, then you can include the method on the submit button html file itself.
    Regards,
    Rengaraj.R

  • 5200 : Error in executing  query -- Hyperion Financial Reporting

    Problem in accessing the Hyperion Financial Reports.User is having full access and able to access all the folders except one folder(Legal Folder reports). We are getting 5200: Error Executing the query error. Recently we have upgraded Hyperion to 11.1.1.3 version . Before upgrade user is not facing the problem. After Upgrade user is getting these errors while accessing the reports. we did research and found in "Error 5200: Error Executing Query" When Viewing Financial Reporting (FR) Reports". Is this error is relevant to the Information provided in Metalink and also can you please tell us is there any impact on doing the solution provided in the below. Why is this error is coming is any preferences needs to be changed.Please help us on this.
    Error Description:
    5200: Error executing query
    Servername/ApplicationName/DatabaseName/Error(1007090) Unknown Member name [Current Point of view for years] in Outline Query
    Doc ID 1107142.1:
    Possible Cause 1:
    If members have recently been added, moved, or deleted from the data source, Essbase, HFM, or Planning, the existing User POV records become out of sync.
    The User Point of View record uses indexing to identify the member. If the index changes because of changes in the outline, the User Point of View record no longer points to the correct location in the outline.
    To resolve the issue, you need to run the ManageUserPOV utility on a Windows server that has the Financial Reporting Reports Server, or in a Unix or Linux environment, has the Financial Reporting Print Server installed.
    You will need to provide a BIPlus Global Administrator user ID and password to run the utility.
    The utility will provide the correct syntax to run the command.
    1. In \Hyperion\products\biplus\bin\ManageUserPOV.properties, specify the following parameters:
    a. ReportServer
    b. DatasourceUser
    c. DatasourcePassword
    d. User
    e. Datasource (You can find the datasource in Workspace under Tools>Database Connection Manager in the Name column.)
    2. From the command line, cd to Hyerion\products\biplus\bin
    3. Type in "ManageUserPOV" without the quotes. The executable will read the parameters previously set in the ManageUserPOV.properties file.
    Thanks,
    Naresh.

    Take a look at this: http://adistrategies.com/index.php?loc=knowledge1&item=291
    Hope it helps.
    Mehmet

  • Email submit button issue

    Hi Guys,
    I have designed few forms recently and i am fairly new to livecyle, I have actually 2 issues, bit odd and i have tried to be as much discriptive as i can.
    email submit button on all my forms works but it sends email to one perticular address and not to one that i programmed it to.
    I.e. Form 1 - email to  [email protected] - when i press submit button it will send email to [email protected]
    Form 2 - email to [email protected] - when i press submit button it will send email to [email protected]
    Form 3 - email to [email protected] - when submit button is pressed it sends email to [email protected]
    Now when i use this button on actual form it sends email to right addresse but it is obviously in XML format and wouldnt work for us, when i use button on distributed copy of the form (created via distribute form button) it sends email to wrong addresse in PDF formate (which is the formate we like).
    Also whatever i put in Email Subject box - it will always put "submitting completed form" in the email subject line.
    Not sure if it makes any different but we use outlook and i have tried this from several pcs.
    I think i have cheked and rechecked everything and can't fix it, any help would be great.
    Process i use to create this button is - Insert >standard>email submit, i will then put desired email address and email subject in relevant fields under Object pellette.
    Thanks,
    H

    There are two ways to set the adress in LiveCycle I know:
    1st is with the button itself, second is with Javascript/Formcalc.
    If I got you right and you have 3 different forms you could search for the [email protected] adress in the xml's and exchange it there or check out where the form gains the mail adress from. It's the easiest method to get rid of something you are not that sure where it is located in the form but know what it does ;D . (I had some similar problem since I overtook forms of someone else.)
    Did you check this thread out? http://forums.adobe.com/thread/462681?tstart=0
    Paul gave an example there how to deal with the various things on mail buttons.
    Edit: PS: On which event did you script it? Normally you can't script on the mail button itself so you need a fake button like Paul said.
    I'm also not good with Reader Extensions, since I can't experiment with those sry

  • How can I add a third e-mail address to a submit button?

    Right now it's only limited to two addresses.
    The form in question is here: http://www.ucmexus.ucr.edu/resources/Final_Narrative_Report_CONACYT.pdf
    I need to add a third person to the existing addresses in the submit button.
    Using Acrobat X Pro.

    To bcc out of acrobat is going to be very tricky as you will have to run a script in order for the form to identify the bcc line. It will look something like the following. You will have to pair this script with a button to intialize the event script. I will chaeck and see if there is a script for acrobat but your best bet is to go the livecycle route.
    form1.#subform[0].Email::initialize - (JavaScript, client)
    // add names and email addresses to the "To", "CC" and "BCC" lists
    var recipientList = new Array(new Array("John", "[email protected]"), new Array("Lisa", "[email protected]"),
      new Array("Paul", "[email protected]"), new Array("Steve", "[email protected]"), new Array("Tracy", "[email protected]"));
    To.clearItems();
    CC.clearItems();
    BCC.clearItems();
    for (var i = 0; i < recipientList.length; i++)
    To.addItem(recipientList[i][0], recipientList[i][1]);
    CC.addItem(recipientList[i][0], recipientList[i][1]);
    BCC.addItem(recipientList[i][0], recipientList[i][1]);
    form1.#subform[0].Email.BCC::change - (JavaScript, client)
    var email = this.boundItem(xfa.event.newText); // get recipient email address
    var newSubject = null; // set this to a new subject if you want
    var emailSubmitNode = FindSubmitNode(EmailSubmitButton);
    if (emailSubmitNode)
    function FindSubmitNode(button)
    if (button == null)
      return null;
    var eventList = button.resolveNodes("event");
    for (var i = 0; i < eventList.length; i++)
      var eventNode = eventList.item(i);
      if (eventNode.activity == "click")
       // found the click event -- look for the child <submit> node
       if (eventNode.submit != null)
        return eventNode.submit;
    return null;
    form1.#subform[0].Email.CC::change - (JavaScript, client)
    var email = this.boundItem(xfa.event.newText); // get recipient email address
    var newSubject = null; // set this to a new subject if you want
    var emailSubmitNode = FindSubmitNode(EmailSubmitButton);
    if (emailSubmitNode)
    function FindSubmitNode(button)
    if (button == null)
      return null;
    var eventList = button.resolveNodes("event");
    for (var i = 0; i < eventList.length; i++)
      var eventNode = eventList.item(i);
      if (eventNode.activity == "click")
       // found the click event -- look for the child <submit> node
       if (eventNode.submit != null)
        return eventNode.submit;
    return null;
    form1.#subform[0].Email.Send::click - (JavaScript, client)
    function GetEmailList(listField)
    var emailList = "";
    for (var i = 0; i < listField.length; i++)
      if (listField.getItemState(i))
       // item is selected -- append its email address to the email list
       if (emailList.length == 0)
        emailList = listField.getSaveItem(i);
       else
        emailList += "," + listField.getSaveItem(i);
    return emailList;
    function FindSubmitNode(buttonField)
    if (buttonField == null)
      return null;
    var childList = buttonField.nodes;
    for (var i = 0; i < childList.length; i++)
      var childNode = childList.item(i);
      if (childNode.className == "event" && childNode.activity == "click")
       // found the click event -- look for the child <submit> node
       if (childNode.submit != null)
        return childNode.submit;
    return null;
    if (To.rawValue == null)
    xfa.host.messageBox("Please choose a primary recipient in the 'To' field.");
    else
    var submitNode = FindSubmitNode(EmailSubmitButton);
    if (submitNode)
      var toList = GetEmailList(To);
      var ccList = GetEmailList(CC);
      var bccList = GetEmailList(BCC);
      var newTarget = "mailto:" + toList;
      var optionList = new Array();
      if (ccList.length > 0)
       optionList.push("cc=" + ccList);
      if (bccList.length > 0)
       optionList.push("bcc=" + bccList);
      if (Subject.rawValue != null && Subject.rawValue.length > 0)
       optionList.push("subject=" + Subject.rawValue);
      if (Body.rawValue != null && Body.rawValue.length > 0)
       optionList.push("body=" + encodeURIComponent(Body.rawValue));
      for (var i = 0; i < optionList.length; i++)
       if (i == 0)
        // special case for the first option: a "?" must separate the options
        //  from the recipient ("to") list
        newTarget += "?" + optionList[i];
       else
        newTarget += "&" + optionList[i];
      console.println("before: " + submitNode.target);
      // set the email submit button's new target information
      submitNode.target = newTarget;
      console.println("after: " + submitNode.target); 
      // execute the email submit button with the new target information
      EmailSubmitButton.execEvent("click");
    else
      xfa.host.messageBox("Unable to configure email submit button!");

Maybe you are looking for