Popup Window - Passing Parameters

I need some help w/ popup windows and passing parameters back and forth.
On page 7 (report page), I have:
- TXT_P7_SALESREP displays the names of the selected sales reps, defaults to All
- CMD_P7_PICKSALESREP opens the pop up window when clicked
- H_P7_SALESREPIDLIST stores the list of the currently selected sales rep ids (used to generate the report)
On page 10 (popup page), I have:
- CBL_P10_SALESREP a check box list of all sales reps (by name)
- H_P10_SALESREPIDLIST stores the list of currently selected sales rep ids
- CMD_P10_OK to submit the changes and close the page
- CMD_P10_CANCEL to close the popup window w/o saving any changes (I got this working already via the close popup window process)
The process should be something like:1) User opens report page, 'All' is displayed in the text box, and H_P7_SALESREPIDLIST contains all the sales rep ids
2) User clicks CMD_P7_PICKSALESREP to change list of sales reps
      2a) Popup window opens & the value of H_P10_SALESREPIDLIST is set to the value of H_P7_SALESREPIDLIST
      2b) CBL_P10_SALESREP has values checked based on the value of H_P10_SALESREPIDLIST (all by default, but a user could change sales reps multiple times)
3) User makes their changes and hits OK
      3a) Value of H_P10_SALESREPIDLIST is updated w/ list of currently selected sales reps
      3b) Value of H_P7_SALESREPIDLIST is updated w/ the value of H_P10_SALESREPIDLIST
      3c) Popup window is closed, returning the user to the report page
      3d) TXT_P7_SALESREP is updated via the contents of H_P7_SALESREPIDLIST
4) User runs the report which is processed/displayed based on the values of H_P7_SALESREPIDLISTI tried putting javascript:popupURL('f?p=&APP_ID.:10:&SESSION.::NO::H_P10_SALESREPIDLIST:&H_P7_SALESREPIDLIST'); in the URL Target for CMD_P7_PICKSALESREP, but it didn't work. I just dont know enough about passing parameters and APEX-specifics to set this up myself. Any help would be appreciated.
I'd prefer to do this w/ as little javascript coding as possible, but I understand it may be necessary.

Hello
Change the URL for CMD_P7_PICKSALESREP to be
javascript:showPopup();
Add the JS below into the HTML Header of page 7 <script>
function showPopup() {
popupURL('f?p=&APP_ID.:10:&SESSION.::NO::H_P10_SALESREPIDLIST:' +  $v('H_P7_SALESREPIDLIST') )
</script>Change the URL for CMD_P10_OK to be
javascript:updateValues();
Add the JS below into the HTML header of page 10 <script>
function updateValeus() {
$s('H_P10_SALESREPIDLIST', $v('CBL_P10_SALESREP') )
window.opener.document.getElementById('H_P7_SALESREPIDLIST').value= $v('H_P10_SALESREPIDLIST')
window.opener.document.getElementById('H_P10_SALESREPIDLIST').value= $v('H_P10_SALESREPIDLIST')
doSubmit();
window.close();
</script>varad

Similar Messages

  • Popup Window passing values

    Hi,
    Thanks for any help.
    Can anyone help me with the below syntax. The popup page doesn't open at all:
    <script language = "javascript">
    function openPopUp()
    window.open(f?p=&APP_ID.:50:&SESSION.::NO::P50_ID:#EMPLOYEE_ID#','Popup','width=350,height=250,scrollbars=1,resizable=1');
    </script>

    You are missing a quote before f?.
    A suggestion: if you just want a popup when clicking a link or button, simple code the link or button URL as:
    javascript:popupURL('f?p=....');
    Sorry, that is the deprecated function. Better use
    javascript:html_PopUp(‘url’, ‘windowName’, width, height);
    The full spec is:
    function html_PopUp(pURL,pName,pWidth,pHeight,pScroll,pResizable){
    Edited by: InoL on Oct 14, 2011 4:25 PM

  • Unable to Pass Parameters to Custom PopUp Window ??

    Hi
    Please help in passing Data from an MXML  file to my POPUp window mxml
    MainMXML File :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" horizontalAlign="left" verticalAlign="middle">
        <mx:Script>
            <![CDATA[
                import mx.events.FlexMouseEvent;
                import MyPopUpWindow;
                import mx.events.FlexEvent;
                import mx.managers.PopUpManager;
                private var popup:MyPopUpWindow;
                private function openPopUpWindow():void {
                    popup = PopUpManager.createPopUp(this,MyPopUpWindow,true) as MyPopUpWindow;
                    PopUpManager.centerPopUp(popup);
            ]]>
        </mx:Script>
        <mx:Canvas width="288" height="177">
           <mx:HBox id="jai">
            <mx:Image source="images/canvas.png" visible="true" height="100%" width="100%"/>
            <mx:Label id="kkk" text="Ravi"/>
            <mx:Button label="Edit" click="openPopUpWindow()"/>
        </mx:HBox>
        </mx:Canvas>   
    </mx:Application>
    =======
    MyPopuWindow.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <!-- custom popup window component - comps/MyPopUpWindow.mxml -->
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
            layout="vertical"
            title="My Custom PopUp Window"
            showCloseButton="true"
            close="PopUpManager.removePopUp(this)">
            <mx:Script>
                <![CDATA[
                    import mx.managers.PopUpManager;
                ]]>
            </mx:Script>
            <mx:Form>
                <mx:FormHeading label="User"/>
                <mx:FormItem label="Username">
                    <mx:TextInput id="un" />
                </mx:FormItem>
            </mx:Form>
    </mx:TitleWindow>
    On to the TextInput i need to have the value of Label kkk value . I tried with inline  binding but it didn't worked
    <mx:TextInput id="un"  text= {kkk.text}/> isn't working . please help

    Thanks for the idea, I did this way . Its working but worried as what happens if its not present inside Main Appliction.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" horizontalAlign="left" verticalAlign="middle">
        <mx:Script>
            <![CDATA[
                import mx.events.FlexMouseEvent;
                import MyPopUpWindow;
                import mx.events.FlexEvent;
                import mx.managers.PopUpManager;
                private var popup:MyPopUpWindow;
                [Bindable]
                public var str:String ;
                private function openPopUpWindow():void {
                    popup = PopUpManager.createPopUp(this,MyPopUpWindow,true) as MyPopUpWindow;
                    str = kkk.text;
                    PopUpManager.centerPopUp(popup);
            ]]>
        </mx:Script>
        <mx:Canvas width="288" height="177">
           <mx:HBox id="jai">
            <mx:Image source="images/canvas.png" visible="true" height="100%" width="100%"/>
            <mx:Label id="kkk"  text="Pavan"/>
            <mx:Button label="Edit" click="openPopUpWindow()"/>
        </mx:HBox>
        </mx:Canvas>   
    </mx:Application>
    ========
    <?xml version="1.0" encoding="utf-8"?>
    <!-- custom popup window component - comps/MyPopUpWindow.mxml -->
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
            layout="vertical"
            title="My Custom PopUp Window"
            showCloseButton="true"
            close="PopUpManager.removePopUp(this)">
            <mx:Script>
                <![CDATA[
                    import mx.core.Application;
                    import mx.managers.PopUpManager;
                ]]>
            </mx:Script>
            <mx:Form>
                <mx:FormHeading label="User"/>
                <mx:FormItem label="Username">
                    <mx:TextInput id="un" text="{Application.application.str}"/>
                </mx:FormItem>
            </mx:Form>
    </mx:TitleWindow>
    please sugest correct approach .

  • Passing data from calling page to popup window

    Hi All,
    We are developing a BSP application for business card.I need to provide a preview button .
    when the user clicks this button a
    poopup window should open with the preview of business card.
    My problem is how to pass the values like name , designation etc from the main page to popup window.
    The code for previre image:
    <h t m l b : i m a g e   s r c = " s _ b _ d e  tl . g i f  " a l t = " P r e v i e w   C a r d "  o n C l i c k="addr" on C l i e n t C l i c k = " c a l l W i n d o w ( ) ; "/>
    <s c r i p  t t y p e = " t e x t / j a v a s c r i p t ">
    f u n c t i o n  c a l l W i n d o w ()
    w i n d o w .o p e n ( " p r e v i e w . h t m " ) ;
    </s c r i p t >
    preview.htm is a simple HTML page . i need to pass values from main page to this page.
    OR
    Is it possibel to restrict the size of a VIEW to use it as a popup window?
    OR
    is there any other way to achieve this like.. the <bsp:call comp_id=" " />
    tag , but i have no idea how to use it.
    Thanks,
    Anubhav.
    Edited by: Anubhav Jain on Sep 12, 2008 3:38 PM

    Hi Raja,
    I did as suggested by you...but it is behaving strangely.
    It works fine in debuging mode but when executed directly ....it is not working.
    the scenario is:
    Thers an image for preview as follows:
    <htmlb:gridLayoutCell columnIndex="3" rowIndex="13">
    <htmlb:i m a g e   s r c = " s _ b _ d e t l . g i f "   a l t = " P r e v i e w   C a r d "   o n C l i c k = " a d d r "   o n C l i e n t C l i c k = " c a l l W i n d o w ( ) ; " /  >
    </htmlb:gridLayoutCell>
    The JS code is:
    f u n c t i o n   c a l l W i n d o w ( )
    <%
    data: title(5),
             fname(20),
             lname(20),
             comp(20),
             addr(20),
             city(20),
             state(20),
             pcode(20),
             country(20),
             phone(20),
             fax(20),
             email(241).
             alt_addr-title = request->get_form_field( 'title' ) .
             alt_addr-firstname = request->get_form_field( 'fname' ) .
             alt_addr-lastname = request->get_form_field( 'lname' ) .
             company = request->get_form_field( 'comp' ) .
             alt_addr-street = request->get_form_field( 'addr' ) .
             alt_addr-city = request->get_form_field( 'city' ) .
             alt_addr-region = request->get_form_field( 'state' ) .
             alt_addr-inhouse_ml = request->get_form_field( 'pcode' ) .
             alt_addr-country = request->get_form_field( 'country' ) .
             alt_addr-tel1_numbr = request->get_form_field( 'phone' ) .
             alt_addr-fax_number = request->get_form_field( 'fax' ) .
             alt_addr-e_mail = request->get_form_field( 'email' ) .
    CALL METHOD cl_bsp_server_side_cookie=>set_server_cookie
              EXPORTING
                name                  = 'FORMFIELDS'
                application_name      = runtime->application_name
                application_namespace = runtime->application_namespace
                username              = sy-uname
                session_id            = runtime->session_id
                data_value            = alt_addr
                data_name             = 'alt_addr'
                expiry_date_rel       = 1.
    %>
    w i n d o w . o p e n ( " . . / z _ b i z c a r d / p r e v i e w . h t m " ,   " W i n E " ,   " w i d t h = 2 4 0 , h e i g h t = 3 0 0 , t o o l b a r = n o , r e s i z a b l e = no ")
    I was doing something similar...created a controller and a view , was calling the controller from window.open method with all other parameters for sizing etc.
    How to pass a structure conatining data,from controller to the view...
    Now in the onCreate event of the page PREVIEW.HTM in using;
    CALL METHOD cl_bsp_server_side_cookie=>get_server_cookie
      EXPORTING
        name                  = 'FORMFIELDS'
        application_name      = runtime->application_name
        application_namespace = runtime->application_namespace
        username              = sy-uname
        session_id            = runtime->session_id
        data_name             = 'alt_addr'
      CHANGING
        data_value            = alt_addr.
    and in the layout of PREVIEW.HTM in am using this alt-addr:
    But if put a break point at the onCreate event of preview.htm and the execute i get the values in alt_addr but if i execute directly...it is empty in the layout?
    What is the problem?
    Thanks,
    Anubhav.

  • Passing parameters in a pop up window

    i just wanna know how to pass parameters in a pop up window.. thanks

    Hi baby,
    document.getElementById(page).onclick = popUp;The above line appears strange to me ..
    I have a simpler version for you based on ur code ...
    function NewWindow (jsppage)
    var mnth = document.forms[0].cmbmonth.value;
    var yr = document.forms[0].cmbyear.value;
    page = jsppage+'?cmbmonth='+mnth + '&cmbyear=' +yr
    window.open(jsppage,"","height=250,width=400,status=no,location=no,toolbar=no,directories=no,menubar=no");
    <input type ="button" onclick="NewWindow ('SP_2.jsp')" >
    So youe need not pass the cmbmonth , cmbyear value in every function call since u can access the value within javascript itself.
    By the way I hope cmbmonth & cmbyear are not drop downs otherwise you might need to do like this ..
    var ind = document.forms[0].cmbmonth.selectedIndex;
    var mnth = document.forms[0].cmbmonth[ind].value;

  • How to pass the values from popup window to parent's window

    Hi Experts,
    in my application i need to develop one popup window in that i have created 4 dropdowns and one ok button , if i willl click on that ok  button the values should pass to parent window dropdownlistboxes
    can any body suggest how i will get the popup window values
    thanks in advance,
    ramani.

    Hi Ramani,
    I can provide few inputs on how can we control JSP 2 from JSP1.
    Here is the code. Check if you can convert this to make useful to you. I am not passing values but control.
    here it is:
    JSP 1.
    <h1>Page One</h1>
    <br>
    <a href="/irj/portalapps/<PAR_FILE_NAME>/images/<HTML_PAGE_NAME>.html#part1">part 1</a>
    <br><br><br>
    <a href="/irj/portalapps/<PAR_FILE_NAME>/images/<HTML_PAGE_NAME>#part2">part 2</a>
    <br><br><br>
    <a href="/irj/portalapps/<PAR_FILE_NAME>/images/<HTML_PAGE_NAME>#part3">part 3</a>
    JSP 2.
    <h1>Page Two</h1>
    <br>
    <a name="part1">
    <h3>Part 1</h3>
    </a>
    <a name="part2">
    <h3>Part 2</h3>
    </a>
    <a name="part3">
    <h3>Part 3</h3>
    </a>
    This way you can move from one JSP to other.
    regards
    -Kedar Kulkarni
    reward points if useful.
    Message was edited by:
            Kedar Kulkarni

  • How to pass field value from popup window to oninput processing of other pg

    Hi,
    I want to pass a field value from the popup window to oninput processing of main page ( from where popup window is triggered). and need to close the popup window. How to do it ?
    In the popup window's oninputprocessing, im doing some validation checks. If it passes all the validations, then only the control shd come to main page ..else it should stay in popup window only .
    Regards,
    Jothi.

    Hi Jothi,
    you can use java script to pass the value and close your popup window. use the following code.
    in your popup window:
    function passData(h1)
             window.opener.document.getElementById('var1').value = h1 ;
             window.close();
    then call this function when you finish your validations.
    in your main page layout create an input field with id as passed in the function above "var1".
    In the value attribute give it your variable as follow:
    <htmlb:inputField id      = "var1"
                              value   = "<%= var2 %>"
                              visible = "false" />
    "var2" will be assigned the value from your popup window.
    I hope this will help you..
    Regards,
    Husain

  • Passing context value to Popup Window

    Hi,
    I am having a list of Sales Order numbers in a table.  And if any one of the SO is clicked then a popup have to show its item details with in a table.
    I am having the values of item list in the main view context and how to pass this data to the popup window. Also how to create the table in a window.
    RK

    Got the solution.
    Thanks
    RK

  • Passing checkbox values to popup window on page submit

    Hello,
    I'm using APEX 3.2.
    On one page I have a SQL report with checkboxes that are dynamically created using SQL: select apex_item.checkbox(1, bm_id) as "check", ...
    I now want to add a button to the page and when a user clicks on the button, the page should submit and a popup window should open with some extra fields to fill in. Now, in the popup window, I want to add a PL/SQL process and loop to all the values of the checked checkboxes in the parent page using the APEX_APPLICATION.G_F01() array. Can I do this? I tried it but the array always seems to be empty. Do I have to pass all checked values to the Javascript function which opens the popup window??
    Thanks,
    Matthias

    Matthias:
    The APEX_APPLICATION.G_F01() will have values only after the form has been submitted.
    So,your best bet is to use javascript to make the selected checkbox values available in the pop-up window.
    Varad

  • Transactional Iview passing parameters for search help window

    Hi Experts,
    I have to create a transaction ivew through which i need to pass parameters to search help window (having two entries ). In has to select the particular entry and then go to next step.
    Can somebody give me guide me how to do it as i couldn't fine correct answer in the existing forum answers.
    Regards,
    Suresh

    Hi Suresh,
    Have you read the [documentation|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/88/266a3e54a2e946e10000000a114084/frameset.htm]?
    >ApplicationParameter
    >
    >You can enter parameter values for certain screen fields for displaying a SAP transaction here.
    >This field is optional.
    >
    >The parameter values are specified with the following syntax:
    >
    ><Screen_field1>=<Parameter1>
    >&<Screen_field2>=<Parameter2>
    >&<...>=<...>,...
    >
    >Process First Screen
    >
    >The possible values are trueand false. By default this field is defined as false. It is a required field.
    >
    >If the value is set to true, this corresponds to the input key function in the transaction. It takes effect if there are no required >fields in the transaction or if all the required values are maintained in the ApplicationParameter property.
    Regards,
    Pierre

  • Passing Value from a Popup Window Back to the Parent Window

    I am using JSF. I try to pass a value that is entered by users in the popup window back to a text field in the parent window.
    quote: document.forms[ ].elements[ ] is null or not an object.
    The relevant code snippets are shown below. The screen1.jsp is the parent window:
             <script language="JavaScript1.1">
               function doPopup(source)
                    popup = window.open("externalFilePopup.jsp",
                        "popup",
                         "height=300,width=200,toolbar=no,menubar=no,"                    + "scrollbars=yes");
                    popup.openerFormId = source.form.id;
                    popup.focus();
               </script>
    <h:outputText value="Enter the external system file name"/>        <h:inputText value="#{dataManagementBean.ip}" size="18" />
    <h:commandButton value="..." onclick="doPopup(this); return false;" />
    ..........The externalFilePopup.jsp is the popup window:
            <script language="JavaScript1.1">
                function doSave( value )
                   var formId = window.openerFormId;
                   opener.document.forms[ formId ].elements[ formId + ":ip" ].value = value;
                   window.close();
            </script>
         <h:outputText value="IP Address: "/>
         <h:inputText size="25" value="#{dataManagementBean.ip }" required="true"/>
         <h:commandButton value="OK" onclick="doSave('#{dataManagementBean.ip}');"/>
            .......... The script error occurs when I click on this OK button.
    Please point out the mistakes in my code. Thank you.

    I have made some modifications to the code in the popup window. The error reported in my previous posting is gone. But, I still have several problems:
    1. syntax error in the popup window jsp page: line 45, char 21, syntax error, ..., Do you want to continue running script on this page?2. The popup window does not close after I click on the OK button that I coded in the popup window jsp.
    3. The value that I entered in the popup window eventually gets passed back to the text field in the parent window only if I re-run the application.
    The relevant JavaScript code snippets are:
            <script language="JavaScript1.1">
                function doSave( value )
                   var formId = window.openerFormId;
                   opener.document.forms[ formId ].form[ formId + ":ip" ].value = value;
                   window.close();
            </script>
                                       <h:outputText value="IP Address: "/>
         <h:inputText size="25" id="ip" value="#{dataManagementBean.ip }" required="true"/>
         <h:commandButton value="OK" onclick="doSave('ip'); return=false;"/>
    ......What are the mistakes that I made?

  • Passing page attribute to popup window

    Hello friends -
    I want to pass the internal table which is page parameter of page 1 to page2.
    I am opening page2 from page1 as a popup by using window.open command.
    Is that auto passing of attribute works in this case?
    Basically i want to know how to pass values from parent to popup window?
    Thanks in advance.
    Thanks
    Hari

    couple of options
    1. server side cookie
    2. itab as application class attributes.
    for both approaches search the forum for sample code
    Raja

  • Pass parameter to popup window

    I have a popup window that open cfm form(ical.cfm).
    <SCRIPT language="JavaScript1.2">
    function poponload()
    testwindow= window.open ("ical.cfm", "mywindow",
        "location=1,status=1,scrollbars=1,width=300,height=300");
    testwindow.moveTo(0,0);
    </SCRIPT>
    I need to pass evetID to the popup window. How I can do that. I need to pass (# CollegeEvents .eventID#)
    <cfoutput query="CollegeEvents">
    <img src="../images/events.jpg" onclick="poponload()"> 
    </cfoutput>

    Make it a url variable.
    In the window.open command, append the name-value pair in the usual manner.  Refer to the address bar of your browser for an example.
    In the pop-up, refer to the variable in the url scope.

  • How to pass value from report table to Popup window

    suppose i have a report region
    from query
    "Select * from emp"
    i need to get a popup when i click on the row,
    i need all the columns should be displayed inthe popup window;
    i have written javascript in the report template, by passing #COLUMN_VALUE#
    the issue here is iam only getting the column on which i click,
    is there any way to refer the next column ?
    or am i doing it in wrong manner ?

    Hi Mike,
    Yes what you said is exactly correct ,
    i have a query , but for that i need some PK { three columns } from the the page where this popup will be called,
    i have three columns in the row which makes it as PK,
    now how can i pass three columns from a page to popup ? provided if i click on the row of an table, i want that rows three column to be passed .

  • Passing parameters to FMX via windows CMD

    Hi, all!
    is it possible to run a form from windows command line and pass some specific parameters to that form?
    for example,
    start_form.bat[
    c:\orawin95\bin\ifrun60.exe module=myForm *<pass parameters syntax>* userid=user1/user1_pass@oraInst
    Next command showing info about using ifrun60 and I think that passing parameters to a form is not provided.
    ifrun60 ?
    Thanx

    I can not change the code of the form because it is a part of the banking system, purchased from the developer (mainly this form called from reports menu using CALL_FORM). Parameter, of course, there is, otherwise I would not ask the question.
    Arun, you were right!
    Yesterday's attempt to run the form failed, because perhaps I was mistaken in the name of the parameter form (case sensitive, I was taped in lower case).
    So, result:
    there are parameter named MST_MNEMO, and
    ifrun60 module=MS_REPORTS mst_mnemo=TAX_REPORT
    works as I expected, consequently, in the form you can pass any option that name is different from the parameters of IFUN60. ;)
    Thanks to all.
    Edited by: just me on 20.11.2009 9:58

Maybe you are looking for

  • Is the only way to allow Acro Reader commenting in a PDF to do it through Acro Pro?

    I have Standard and can't see a way to do it. Do I need Pro for this? Or are there any other (legal) ways to do it? Thanks in advance.

  • Can't get BT mail to work

    I was moved to BT mail from BT Yahoo Mail about 2 weeks ago. Since then I have been unable to use the BT Mail and have had to rely upon my Hotmail account and Incredimail to send & receive e-mail. When I click on the Email tab I get a page saying tha

  • Why is that New Toolbar Created while costomizing crashes as soon as Firefox is closed?

    I am using Firefox for many years now and I simply love it.The fact that this is my first communication to you shows that I had absolutely no problems wit Firefox, until now that is! The problem is Add-on Buttons along with the Toolbar keep disappear

  • Editing from a pile of.dpx files

    Hello! I'd like to work my way from a disk full of .dpx files to being able to cut some sequences. Its not going to go back to film at the moment but they're beautiful pictures and I'd like to work at highest quality possible. I have at my disposal:

  • Adjust fonts on calendar for iPad's to see better.

    Hi, I have an iPad2 and my parents can't see the calendar very well as the fonts are too small.  Have tried to adjust the font settings and that did not work. I am requesting APPLE to update urgently the ability to adjust font size so you can read it