Processing Child form on parent window..

Hi.. anyone here has any idea how to process a child form on a parent window.. like for example, i click on submit button on the child window, and the form directs to another JSP file which its results should be display on the parent window.. anyone has any idea?

Hi!
I had similar problem, I used frames and needed to submit a form from a frame to parent window. I used property "target" of form to specify where I want this form to be submitted, like this:
function submit() {
     form.target = "name of the target where to submit";
     form.submit();
or something like this:
<html:form action="/blahblah" target="name of the target where to submit" method="post">
hope it helps
Vassili Skarine

Similar Messages

  • How to access objects in the Child Form from Parent form.

    I have a requirement in which I have to first open a Child Form from a Parent Form. Then I want to access objects in the Child Form from Parent form. For example, I want to insert a record into a block present in Child Form by executing statements from a trigger present in Parent Form.
    I cannot use object groups since I cannot write code into Child Form to first create object groups into Child Form.
    I have tried to achieved it using the following (working of my testcase) :
    1) Created two new Forms TESTFORM1.fmb (parent) and TESTFORM2.fmb (child).
    2) Created a block named BLK1 manually in TESTFORM1.
    3) Created two items in BLK1:
    1.PJC1 which is a text item.
    2.OPEN which is a push button.
    4) Created a new block using data block wizard for a table EMPLOYEE_S1. Created items corresponding to all columns present in EMPLOYEE_S1 table.
    5) In WHEN-NEW-FORM-INSTANCE trigger of TESTFORM1 set the first navigation block to BLK1. In BLK1 first navigable item is PJC1.
    6) In WHEN-NEW-ITEM-INSTANCE of PJC1, code has been written to automatically execute the WHEN-BUTTON-PRESSED trigger for the "Open" button.
    7) In WHEN-BUTTON-PRESSED trigger of OPEN item, TESTFORM2 is opened using the following statement :
    open_form(‘TESTFORM2',no_activate,no_session,SHARE_LIBRARY_DATA);
    Since its NO_ACTIVATE, the code flows without giving handle to TESTFORM2.
    8) After invoking OPEN_FORM, a GO_FORM(‘TESTFORM2’) is now called to set the focus to TESTFORM2
    PROBLEM AT HAND
    ===============
    After Step 8, I notice that it passes the focus to TESTFORM2, and statements after go_form (in Parent Form trigger) doesnot executes.
    I need go_form with no_activate, similar to open_form.
    Edited by: harishgupt on Oct 12, 2008 11:32 PM

    isn't it easier to find a solution without a second form? If you have a second window, then you can navigate and code whatever you want.
    If you must use a second form, then you can handle this with WHEN-WINDOW-ACTIVATED and meta-data, which you have to store in global variables... ( I can give you hints if the one-form-solution is no option for you )

  • How to automatically click add button on Process child form?

    During automatic provisioning of SAP CUA resource defined using access policy, how do I automatically click the "add" button to add the pre-populated role and system?
    Auto-save is already checked in the process definition of provisioning process.
    Thanks!

    Thanks for the detailed steps. None of the information I specify in the child form is getting saved and I am getting the following errors. Bits from the log:
    2009-04-20 11:42:12,297 ERROR [STDERR] java.lang.Exception: The length of the string '$tart,409' is too long for the field length of size 8
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.rulegenerators.tcBaseRuleGenerator.finalizeAdapter(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.rulegenerators.adpPREPOPULATESAPCUAFORM.implementation(adpPREPOPULATESAPCUAFORM.java:58)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.rulegenerators.tcBaseRuleGenerator.run(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.rulegenerators.tcAdapterExecuter.executeRuleGenerators(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.util.tcPrePopulateUtility.setDataFromAdapter(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.util.tcPrePopulateUtility.prePopulate(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.util.tcOrderPackages.computeProcessFormData(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.util.tcOrderPackages.createOrder(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.util.tcOrderPackages.orderPackageForUser(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.tcOIU.provision(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.tcOIU.eventPostInsert(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.tcUserProvisionObject.insertImplementation(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.util.tcProvPolicyUtils.provisionObject(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.util.tcProvPolicyUtils.provisionObjects(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.util.tcProvPolicyUtils.doProvisioning(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.util.tcProvPolicyUtils.evaluatePolicies(Unknown Source)
    2009-04-20 11:42:12,297 ERROR [STDERR]      at com.thortech.xl.dataobj.util.tcProvPolicyUtils.evaluatePolicies_UGP(Unknown Source)
    Thanks for your help!

  • Popup form refreshing parent window

    We have a main parent page, from which you can do many things
    (among them add a file, delete a file, replace a file, where
    replace is basically delete then add) - the way it's coded, when
    you first go to the page, the parameters are in the URL; if you add
    a file, they stay in the URL, and everything's happy; if you
    replace or delete a file, though, the URL gets stripped of the
    parameters (since they're now in form variables). If you *then* go
    to add or replace a file after replacing or deleting, when the
    popup that lets you choose the file to add closes and tries to
    refresh the parent, you get the annoying "to display this webpage
    again, Internet Explorer needs to resend form data..." popup. If
    the user clicks "retry", it works just fine, but I'd like to
    eliminate the annoyance if at all possible.
    Right now, the refresh parent/close popup is being
    accomplished with javascript:
    opener.location.reload(true);
    self.close();
    The root of the problem seems to be that the delete function
    doesn't need a popup, and so doesn't retain the full URL with
    parameters, and I could do a lot of work to change that, but I'm
    wondering if there's any other way around this that might be
    simpler, since it's not something that comes up often or even
    causes any functional problems, but is annoying.

    Bummer.
    I actually already tried that, but I think because we're
    using fuseactions, it took me back to the default page for that
    URL, which is not the same page. Ah, well.

  • Child Form Pre Populate

    Hi Experts
    I want to pre populate child form fields from user Definition. But I am not able to do so. I have read so many posts in forum that it is not possible. I can't use access policy.
    I need, whenever user raise a request for resource then few fields of child form should be pre populated. I have to put these fields only on Child Form not Parent that's why I am stuck here.
    Fields are pre populating but add button I have to click. Is there any way to do it.
    Any input from your side will be very helpful.
    Edited by: user11257983 on Aug 23, 2009 4:23 PM

    If they need to be pre-populated then just don't let the user supply a value. If you know it's always going to be provisioned a specific way on the child table, just trigger the task after the create user to insert the entry into the child table. Why does the end user have to see something that they have no control to change?
    -Kevin

  • OIM API - How to get the values in the process form (both parent and child)

    Hi,
    I created an RO with a Process form (both Parent and Child).I created a unconditional process task which takes in the processinstance key and tried to retrieve the process form datas.When i tried to provison the resource,the process task is getting triggered and I could able to get the parent form data but not the child form data.
    Any idea why is this happening?.Is it mandatory to have the "Triggers" ON to get the Child Form data.?
    Thanks,

    try this
    tcResultSet childResults = formOper.getChildFormDefinition(
                             formOper.getProcessFormDefinitionKey(procInstanceKey),
                             formOper.getProcessFormVersion(procInstanceKey));
    This should work,
    Regards,
    Raghav

  • Calling a Function in the Parent Window from the Child Window

    QUESTION: How do I call a function resident in the parent
    window from a child window?
    BACKGROUND
    I have a JavaScript function resident in the parent window
    that reformats information obtained from the Date object and writes
    the result to the parent window using the document.write( ) method.
    I would like to call this function from the child window and have
    it write to the child window instead. Is this possible? If not,
    must I rewrite the entire function and nest it in the below code?
    If so, what is the proper form of nesting?
    CODE: The code that creates and fills the child window is
    provided below. The highlighted area indicates where I would like
    to enter the information from the function resident in the parent
    window. I have tried every imaginable permutation of code that I
    can imagine and nearly destroyed my parent document in the process.
    I am very happy that I had a back-up copy!
    function openCitationWindow() {
    ciDow = window.open("", "", "width=450, height=175, top=300,
    left=300");
    ciDow.document.write("A proper way to cite a passage of text
    on this page:<br /><br />Stegemann, R. A. 2000.
    <cite>Imagine: Bridging a Historical Gap</cite>. " +
    document.title + ". [<a href='" + location.href + "'
    target='_blank'>online book</a>] &lt;" + location.href
    + "&gt; (");
    MISSING CODE;
    ciDow.document.write(").<br /><br /><input
    type='button' value='Close Window' onclick='window.close()'>");
    ciDow.focus();

    Never mind - I was doing something very stupid and wasn't
    calling the function as a method of a movie clip. I was simply
    calling checkTarget(event) rather than
    event.currentTarget.checkTarget(event); which seems to work.

  • How to parse parameter from child window to parent window in JSP

    I have two JSP i.e. course1.jsp and course2.jsp. I would want to find out how I could parse the parameter/value from child window to the parent window when the child window get closed.
    What I am trying to do is actually a file upload process. The child windows will open for user to upload the file, and when close, the file name will be parse into the parent form for database update. Is this something possible at all? or is there any other better approaches.
    Thank you.
    These are the two files:
    --------course1.jsp ------------
    Attach File <p>
    <FORM name="courseForm" action="course2.jsp" method="post" enctype="multipart/form-data">
    <TABLE cellSpacing=1 cellPadding=3 border=0 WIDTH=500>
    <TR >
    <TD>
    <input type="text" NAME="f_file_name" size="30" VALUE="this value should be taken from child windows">
    get file name
    <p>
         <INPUT class="buttons" TYPE="submit" NAME="submit" VALUE="Submit">
    </TD>
    </TR>
    </TABLE>
    </FORM>
    ---- course2.jsp -------
    <%
    String filename = "this is the string needs to go back to parent windows when I click on close";
    %>
    <p>
    close

    In course2.jsp, you have to write some javascript code to reload the parent window document to reload the document with an added parameter. But, instead of doing this, you can also do simple thing; in course2.jsp, you can reference course1.jsp controls via javascript object, "parent". On closing event of course2, you can write:
    parent.courseForm.f_file_name.text = '<%=filename%>' ;
    window.close() ;
    But for this to work, you must open your course2.jsp document thru window.open() function instead of simple hyper link (as you did thru ).
    So, modify the hyperlink line like below:
    get file name
    Hope it helps.

  • Accessing parent window form elements from a JSP file

    Actually I have a JSP page . It calls a popup function to load another JSP file on the event Onclick of a label. In the JSP file loaded on the popup window, I need to access the form elements of the parent.
    Eg: the Parent has a Textarea named "ta_1" in the form "appl_1".
    Now i cannot access this element in the child JSP page using,
    window.opener.document.ta_1.appl_1.value;
    The window.opener is not defined for this HTML page cos the HTML page was generated as an output of the JSP file.
    Please give a JSP code snippet which accesses the parent form element..

    Actually I have a JSP page . It calls a popup function to load another JSP file on the event Onclick of a label. In the JSP file loaded on the popup window, I need to access the form elements of the parent.
    Eg: the Parent has a Textarea named "ta_1" in the form "appl_1".
    Now i cannot access this element in the child JSP page using,
    window.opener.document.ta_1.appl_1.value;
    The window.opener is not defined for this HTML page cos the HTML page was generated as an output of the JSP file.
    Please give a JSP code snippet which accesses the parent form element..

  • Calling a function in child window from parent window

    Hi,
    How can I call a method in child window from parent window in adobe air using javascript. In the following example I need to call mytest() function in
    child.html from parent.html file.
    Thanks,
    ASM
    //parent.html
    <HTML><HEAD>
    <script>
    var initOptions = new air.NativeWindowInitOptions();
    initOptions.type = air.NativeWindowType.NORMAL;
    initOptions.systemChrome = air.NativeWindowSystemChrome.STANDARD;
    var bounds = new air.Rectangle(300, 300, 600, 500);
    var html2 = air.HTMLLoader.createRootWindow(false, initOptions, false, bounds);
    var urlReq2 = new air.URLRequest("child.html");
    html2.load(urlReq2);
    html2.stage.nativeWindow.activate();
    html2.window.mytest();       //NOT WORKING
    </script>
    </HEAD><body></body></HTML> 
    // child.html
    <HTML><HEAD>
    <script>
    function mytest()
      air.trace("in child window");
    </script>
    </HEAD> <body></body></HTML>

    I suspect your problem is that the child window hasn't been created by the time you call the function in the parent.Loading the content is an asynchronous processes -- AIR doesn't stop executing your code until the window has finished loading child.html. So, you will need to add an eventlistener to html2 and call the function from there:
    html2.addEventListener( "complete", onChildLoaded );
    function onChildLoaded( event )
         html2.window.mytest();

  • Window.opener  property from child window to parent window

    Hi
    When communicating between the child (popup) window to the parent window works fine as long as we pass the static reference to the window.opener
    Example :
    Main Page
    form name = staticform
    input name = col1
    Popup Page
    javascript :
    window.opener.staticform.col1.value = some value
    How can I use a dynamic reference for the staticform.col1 in the window.opener property to post the value back to the parent window ?
    thanks for the help
    sarma

    Actually, I think tolmank's would work... I've done basically the same thing before, but more like this (if it's generic, it's a good idea to have checks for the things being in existance). This is something I used in a generic color chooser I wrote in Javascript. Had multiple fields in one form using it for selecting different foreground/background colors.
    <%
    String form = request.getParameter("form");
    String fgfield = request.getParameter("fgfield");
    String bgfield = request.getParameter("bgfield");
    %>
    vfnSet = function() {
       if(typeof(window.opener) == 'undefined' || window.opener == null) {
          return;
       if(typeof(window.opener.document.forms['<%= form %>']) == 'undefined') {
          return;
       var oForm = window.opener.document.forms['<%= form %>'];
       if(typeof(oForm.<%= fgfield %>) == 'undefined') {
          return;
       if(typeof(oForm.<%= bgfield %>) == 'undefined') {
          return;
       oForm.<%= fgfield %>.value = document.forms['colorform'].foreground.value;
       oForm.<%= bgfield %>.value = document.forms['colorform'].background.value;
    }

  • Communicating from child window to parent window

    I'm been trying to communicate a child page with a parent page using window.opener, but I can't make it work. This is an example of what I've been working on (from child to parent). Any idea?
    <$-HTML>
    <$-HEAD>
    <$-TITLE>
    Ventana hija
    <$-/TITLE>
    <$-SCRIPT Language="javascript">
    function cerrar() {
         alert(window.opener.document.url())
         window.opener.frmPadre.field1.Value = document.frmHijo.field1.value;
         window.opener.frmPadre.field2.Value = document.frmHijo.field2.value;
         window.opener.frmPadre.field3.Value = document.frmHijo.field3.value;
         document.frmHijo.valor.value = document.frmHijo.field1.value;
         window.opener.frmPadre.btnSubmit.focus();
    <$-/script>
    <$-/HEAD>
    <$-BODY>
    <$-form name = frmHijo>
    <$-input type = text name = field1><$-br>
    <$-input type = text name = field2><$-br>
    <$-input type = text name = field3>
    <$-input type = button name = btnSubmit Value = "DEVOLVER" onClick = cerrar()>
    <$-/form>
    <$-/BODY><$-/HTML>
    The parent window hast a form name frmPadre with those 3 fields.

    Javascript is not java, but here are a couple of tips for debugging:
    You can use the browser address bar to alert stuff
    ie : put this into the address bar of your browser and see what happens: javascript:alert("Hello world")
    I would recommend you progress like this - slowly building up the link until you find where you go wrong.
    In this case, I think you missed out a "document"
    javascript:alert(window.opener)
    javascript:alert(window.opener.frmPadre)
    javascript:alert(window.opener.document.frmPadre)
    javascript:alert(window.opener.frmPadre.field1)
    Also just as a tip, cross browser scripting is a lot easier to maintain if you limit your self to calling FUNCTIONS in other windows.
    ie rather than setting the values in the other windows textfields, call a function (with parameters) which does it.
    eg in this case it might be:
    window.opener.setPadreFields(document.frmHijo.field1.value, document.frmHijo.field2.value, document.frmHijo.field3.value)
    The function would take the parameters and put them in the appropriate place on the form.
    Doing it this way decouples the pages a little - you only interact with the other page via the function (single point of entry) and if you modify the page in the future (eg change the name of a field) it is much easier to find everywhere you need to do this.
    Hope this helps,
    evnafets

  • Problem in Passing the value from child window to Parent window.

    Hi Frenz,
    I have a requirement like this. i have to pass a value from child window to parent window to one test field. That text field is not a normal text field.
    It was created like the following as SQL query.
    select
    ''LNo,
    apex_item.text(25,'',0,15,
    'style="width:100px;" onblur="javascript:showUpsell(this.value);" onkeypress="javascript:validateKeyPress(event,this.value,this.id);" onkeyup="javascript:this.value=this.value.toUpperCase();" id="P37_ITEMNO"') ItemNo
    Now i want to pass a value to the Item no from child window.
    i wrote the java script like this,
    opener.document.forms[0].f25.value="100";
    It was not working..Any suggestions for that..
    Thanks in advance

    Dear Baaju,
    How do you redirect your control from Child to Parent window.
    If you use a button to do this, then you can set this value in the branching of page.
    Rana

  • How to pass a data from child window to parent window

    Hi,
    I have a jsp page with two hidden fields and a button, On clicking the button a popup will come out. There are two combobox in the popup and a search button. After putting a value in the comboboxes,if I click the search button, I need the datas of the combobox to pass to the parent's hidden fields then I need to do a data base search with that values of hidden fields and display the result in the parent page.
    I could I solve this problem, Please help, Its urgent.
    Thanks and Regards
    Rajib Sharma

    I think that you can use the JavaScipt as follow to pass a data from child window to parent window
    <HEAD>
    <script>
    function passData(){
    opener.form1.test1.value=form2.test2.value; //pass the value of test2 to the parent's test1
    window.close();
    </script>
    </HEAD>
    <BODY>
    <form name=form2>
    <input name=test2 type=text>
    <input type=button onclick="passData()" value=CLOSE>
    </form>
    </BODY>

  • Move data from Child window textbox to Parent window Mainwindow WPF

    I'm trying to take what's in a textbox in the child window to the textbox in the Parent window and close the child window...? any links or  a code example to help please
    Thank you in advance

    Hi
    Create a Main window with a button and a child window with a text box in it and try to use this code in the main window
    namespace WpfApplication
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    public MainWindow()
    InitializeComponent();
    ChildWindow childWindow;
    string CaptureMessageFormChildWindow;
    private void button1_Click(object sender, RoutedEventArgs e)
    childWindow = new ChildWindow();
    childWindow.Show();
    childWindow.Closed += (s, args) => MessageBox.Show(childWindow.textBox1.Text);
    CaptureMessageFormChildWindow = childWindow.textBox1.Text;
    //Now you can use the data captured form the child windows
    The complexity resides in the simplicity Follow me at: http://smartssolutions.blogspot.com

Maybe you are looking for

  • How do i move itunes account from one computer to another?

    I need to move my wife's itunes account from her PC to my Mac.  It will be the second itunes account on our mac.  She will long in as her own user on the mac.

  • SQL Developer 4.0: 'Open Declaration' bugs

    There are several issues I have with this function: 1) Sometimes, when used, it would just "hang" the UI, loading the CPU for 50% for a few seconds. 2) It doesn't seem to work for functions/procedures outside packages, you have to use 'Popup describe

  • Unable to edit XQuery map

    Is anyone else having problems editing XQuery maps in WL Workshop? I have created my own schema and then use it to map the input parameters to internal Java types for a Web Service. The XQuery editor works fine the first time - that is I bring up the

  • Portal Favourites to appear in new window?

    I have some reports set as favorites in the Portal Favorites. I see that I can click on the icon on the topright corner and select "open in a new window" which would show me all the favorites.Now what i want to do is when i click on any one of the fa

  • Getting error when calling package from master

    Hi , I am facing one issue , when i am running package indivisually its running fine , but when I am calling same package from Master package it gets failded. below is the error massage which I am getting. "Exception has been thrown by the target of