PopUp Window Actions

This tutorial:
http://www.kirupa.com/developer/mx/centered_popup.htm
shows how to create a centered pop-up window when a button is
clicked on... but this is written specifically for a button
instance and not a movie clip instance. I tried editing the code
for my movie clip, but cant seem to get it. I am novice at
actionscript... any help in Lehmans terms would be GREAT! Thanks!
Ken

>>you can change "on(release)" to
"movieInstanceName.onPress=function()".
Except you should use
movieInstanceName.onRelease=function()... buttons
should use onRelease, not onPress.
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

Similar Messages

  • Capture the Popup window action

    Hi,
         I have a requirement when i click 'yes' on popup window i need to save the data. For that  i need to capture the fctcode of save.
    Below is the sample code...
    Data: context_node type ref to if_wd_context_node.
      data: lr_popup type ref to if_wd_window,
            lr_view_controller type ref to if_wd_view_controller.
      data: lr_api_comp_controller type ref to if_wd_component,
            lr_window_manager type ref to if_wd_window_manager.
      lr_api_comp_controller = wd_comp_controller->wd_get_api( ).
      lr_window_manager = lr_api_comp_controller->get_window_manager( ).
      lr_popup = lr_window_manager->create_window(
      MODAL               = ABAP_TRUE
      window_name         = 'WIN_POPUP'  "Name of the window created in step 2
      TITLE               = 'Do you want to save the form'
      CLOSE_BUTTON        = ABAP_TRUE
      BUTTON_KIND         = if_wd_window=>CO_BUTTONS_OKCANCEL
      MESSAGE_TYPE        = if_wd_window=>CO_MSG_TYPE_INFORMATION
      CLOSE_IN_ANY_CASE   = ABAP_TRUE
    *MESSAGE_DISPLAY_MODE = "MESSAGE_DISPLAY_MODE'
    Adds an action to the popup screen buttons
    lr_view_controller = wd_this->wd_get_api( ).
    lr_popup->subscribe_to_button_event(
    button = if_wd_window=>co_button_ok
    button_text = 'Yes'
    action_name = 'SAVE'
    action_view = lr_view_controller ).
      lr_popup->open( ).

    Hi,
    you did right:
    lr_popup->subscribe_to_button_event(
    button = if_wd_window=>co_button_ok
    button_text = 'Yes'
    action_name = 'SAVE'
    action_view = lr_view_controller ).
    Now create action SAVE (within tab 'Action'). When action save is created, method ONACTIONSAVE will be created automatically.
    Within ONACTIONSAVE you can check which button is clicked using the WDEVENT parameter:
    if wdevent->name = 'ON_NO' or wdevent->name = 'ON_YES'.
    endif.
    Regards

  • Dynamic Action on "Get Focus" After Closing a Popup Window

    Hi,
    From one of APEX Application Pages I am calling a Popup Window where users can create a new record. In the Popup Window once the record is created and window is closed, I want to refresh the region on the main page to show the record created in the popup window.
    How do I create a dynamic action which will fire when the main APEX window gets the focus (after the popup window is closed). ?
    Any pointers will be greatly appreciated.
    Thanks & Regards,
    Ashish Agarwal
    http://www.asagarwal.com

    Assuming that you have a dynamic action in the parent page which refreshes the region
    <li> Make a note of the event which triggers your dynamic action, lets call this event A.
    <li> Create a JS function in parent page which triggers event A when called.
    For example if your Dynamic Action trigger is a button(id ="P100_REFRESH") press event
    Your JS function could be
    function Trigger_refreshRegion()
      $('#P100_REFRESH').click();
    The way in which you simulate the Dynamic action deoends on the firing event that you have used, so modify it appropriately.
    <li>Now in the pop up page, if you are closing the page in JS using smthing like window.close() or so,
    just call the parent page's refresh JS function there using the
      opener.Trigger_refreshRegion(); //whatever was the name of the function that you created.

  • Don't close popup window on action

    Hello!
    I have a popup window, which contains another window from my component. I assigned actions to buttons. I need not to close popup after action in some cases. I want to decide in action's method. How can I avoid closing the popup?
    Edited by: Konstantin Milutin on Feb 24, 2010 12:55 PM

    Hi,
    when u are creating the pop up window then there is a parameter close_in_any_case set its value as abap_false.

  • Action to open a popup windows?

    Hi experts,
    In a view I want to have a button which has an action 'search' to open a popup window. So how to write this action code?
    Thanks!

    hi,
    pop up is a new window.
    so make a new view for the pop-up.
    make a window for this pop-up view.
    you will be calling this window as a pop-up.
    make a context element for your window of IWDWindow type.
    write the following code in the action of the event when you want the popup...
    //     IWDWindowInfo objWindowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("<Window name here>");
    //     IWDWindow objWindow = wdComponentAPI.getWindowManager().createModalWindow(objWindowInfo);
    //     objWindow.setWindowPosition(300,150);
    //     objWindow.setTitle("Choose Manufacturer");
    //     objWindow.setWindowSize(300,400);
    //     objWindow.show();
    //     wdContext.currentPopupNodeElement().setCtxManuPopup(objWindow);
    regards,
    -Amol

  • How to disable parent window while popup window is coming

    Hi,
    I am working on Oracle Applications 11i.
    I am able to get the popup window using the Java script in the controller.
    Please see the below code for the reference.
    String pubOrderId = pageContext.getParameter("orderId");
    StringBuffer l_buffer = new StringBuffer();
    StringBuffer l_buffer1 = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    l_buffer1.append("/jct/oracle/apps/xxpwc/entry/webui/AddAttachmentPG");
    l_buffer1.append("&retainAM=Y");
    l_buffer1.append("&pubOrderId="+pubOrderId);
    String url = "/OA_HTML/OA.jsp?page="+l_buffer1.toString();
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:750, height:550},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    But here the problem is, even though popup window is there, i am able to do the actions on the parent page.
    So how to disable the parent page, while getting the popup window.
    Thanks in advance.
    Thanks
    Naga

    Hi,
    You can use javaScript for disabling parent window as well.
    Refer below link for the same:
    http://www.codeproject.com/Questions/393481/Parent-window-not-disabling-when-pop-up-appears-vi
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Not able to display the desired view if button is pressed in POPup window

    Hi Experts,
    I have developed a web dynpro application.In this i have created a pop up window which consists of three buttons YES , NO and CANCEL.
    I have developed three event handlers in the view VIEW_POPUP which is acting as view of the pop_up window.  When i click on any of these buttons no event handler is getting triggered.
    Please give your suggestion as where the problem is.

    Hi Ravi,
    I think u created a  view and embedded it in another window and calling that window.,
    If u want to display a popup window with action buttons., jus use create_popup_to_confirm() method.
    refer this code,.
    * Data declarations for Pop up window
      data: lt_text type string_table,
            lo_window_manager type ref to if_wd_window_manager,
            lo_api_component type ref to if_wd_component,
            lo_window type ref to if_wd_window,       
            l_api type ref to if_wd_view_controller.
       msgtext = 'Do u want to continue. ?'
        append msgtext to lt_text.
          clear: tmp_from , tmp_to .
          l_api = wd_this->wd_get_api( ).
          lo_api_component = wd_comp_controller->wd_get_api( ) .
          lo_window_manager  = lo_api_component->get_window_manager( ).
          lo_window1 =
          lo_window_manager->create_popup_to_confirm(
                 text = lt_text
                 button_kind = if_wd_window=>co_buttons_okcancel
                 message_type = if_wd_window=>co_msg_type_information   " this is info msg u can give error message here
                 close_button = 'X'
                 window_title = 'Confirmation message box'
    *       lo_window->subscribe_to_button_event
          lo_window1->subscribe_to_button_event(
            button = if_wd_window=>co_button_ok
            action_name = 'SUBMIT_REQUEST'                     " Submitting Request. " u have to create SUBMIT_REQUEST Action
            button_text = 'Yes'                                             " And Place the code in that action which u want to execute when yes
            action_view = l_api
            is_default_button = abap_false
    *       lo_window->subscribe_to_button_event
          lo_window1->subscribe_to_button_event(
            button = if_wd_window=>co_button_cancel
            action_name = 'CANCEL_REQUEST'                     " Calling Action On clicking NO. "u have to create CANCEL_REQUEST
            button_text = 'NO'                                              "Action
            action_view = l_api
            is_default_button = abap_true
          lo_window1->open( ).
    reply if u need some more clarifications.,
    Thanks & Regards
    Kiran

  • To load a pdf file in popup window using flex

    Hi All,
    Can anyone send me the code for loading pdf file in a popup
    window using flex.
    Regards,
    Dharma

    try this action script
    var pdfUrl:URLRequest = new URLRequest("assets/file.pdf");
    navigateToURL(pdfUrl,"_blank");

  • Error when calling a popup window in the initial screen of an application

    Hi,
        I am calling a popup window in the Initial screen to select the variant list.
    I am getting an error reference to Null Object reference.
    Here is the Error.
    Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED_NO
    Exception              CX_SY_REF_IS_INITIAL
    Date and Time          15.06.2007 10:00:16
    Short text
    Access via 'NULL' object reference not possible.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "CL_WDR_MESSAGE_AREA===========CP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
    caught in
    procedure "SUPPLY_VIEW_DATA" "(METHOD)", nor was it propagated by a RAISING
    clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    You attempted to use a 'NULL' object reference (points to 'nothing')
    access a component.
    An object reference must point to an object (an instance of a class)
    before it can be used to access components.
    Either the reference was never set or it was set to 'NULL' using the
    CLEAR statement.
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "OBJECTS_OBJREF_NOT_ASSIGNED_NO" "CX_SY_REF_IS_INITIAL"
    "CL_WDR_MESSAGE_AREA===========CP" or "CL_WDR_MESSAGE_AREA===========CM00Q"
    "SUPPLY_VIEW_DATA"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    The exception must either be prevented, caught within proedure
    "SUPPLY_VIEW_DATA" "(METHOD)", or its possible occurrence must be declared in
    the
    RAISING clause of the procedure.
    To prevent the exception, note the following:
    Looking for Ur valuable suggestions.
    Cheers,
    Sam

    Hi Sam,
    The correct code for creating a popup window will be:
      data lo_window_manager type ref to if_wd_window_manager.
      data lo_api_component  type ref to if_wd_component.
      data lo_window         type ref to if_wd_window.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      lo_window         = lo_window_manager->create_window(
                         window_name            = 'WINDOW_NAME'
    *                    title                  =
    *                    close_in_any_case      = abap_true
                         message_display_mode   = if_wd_window=>co_msg_display_mode_selected
    *                    close_button           = abap_true
                         button_kind            = if_wd_window=>co_buttons_okcancel
                         message_type           = if_wd_window=>co_msg_type_none
                         default_button         = if_wd_window=>co_button_ok
      lo_window->open( ).
    Hope this helps.
    Regards,
    Ram

  • Need to dynamically include an image file when calling a popup window

    I am working on a web dynpro Java app which uses a button to call a popup window/view. Within the popup, I want to dynamically choose an image to show (from mime types) based on a criteria...there will be multiple buttons on the initial view that all call the same popup, but the popup will have content specific to which button called it (specifically the image embedded in the view).
    My question is, what is the proper/best way to do this?
    Here are some possible ways I can think of...
    1. Pass a parameter from each button during the call of the event, but how does that get sent to the implementation of the second view for use in determining which image? And, how do I modify the source property of the image element based on that parameter?
    2. Create multiple pages and views for each button to call...but this seems decidedly un-DRY.
    3. Saw one posting on how to dynamically create a cached image...I could use different event handlers in the initial view, then load individual images from the mime library at that point...cache it into a hard-coded image name...then just call the identical view every time. Not sure this is even possible...input?
    I don't know specifically how to implement any of these options, or know if there are other/better ways. Any help would be appreciated.

    Just create a context attribute "imageFileName" in the component controller or a custom controller, map this attribute from both views (the one that contains the buttons and the one in the popup window that displays the image).
    Now you can have an separate action for each button or one common action. In the first case just set the "imageFileName" inside the action handler for the specific button. In the second case use an action parameter "buttonId" and a parameter mapping
    button.mappingOfOnAction().setParameter("buttonId", button.getId());
    to determine which button triggered the action. After having checked which button was pressed, set the "imageFileName" accordingly.
    Armin

  • How can I show a textarea in a popup  window

    Hi,
    Thankyou for reading this post, but can I state from the outset that I don't want to show a whole page in a popup window - I have read lots
    of posts and googled-pages on that topic so please don't drive down that route.
    I have a table with a few columns in it. One of those columns is a varchar2(4000), and in there is a nicely formatted block of text.
    I want to create a report in an Apex page on the aforementioned table, but have it so that this block of text does not appear in the report but does appear in a modal popup area. So the popup will appear,
    and will have the text block in it, and will have some sort of "close" button too.
    The popup to be modal.
    It doesn't sound like a tricky thing to do, but various searches around the area seem to dredge up different variations that don't seem to be
    malleable enough for me to re-shape them into what I want.
    Any help gratefully received; thanks in advance.
    Mungo
    Edited by: MungoHenning on Oct 1, 2011 3:34 AM

    Hi Jari,
    Ta for the help.
    Anything negative I say might be misconstrued as being ungrateful, but I have sincere thanks for your efforts.
    The boxes on the web page at http://dbswh.webhop.net/dbswh/f?p=BLOG:READ:0::::ARTICLE:1631800346026542 have a limited width. This happens often on my screen - I have a wide screen monitor with two black vertical
    bands either side of useful space that never seems to be occupied with useful stuff. These bands are approximately three inches wide - please would all developer readers spare a thought for those with wide screens that want
    to use the blooming things!
    Because of the "horizontally-squashed" nature of the page, it's not that obvious that some boxes have additional text not shown to the far right. I can easily click, do control-A and then control-C. I wonder whether every other
    reader would be aware of this.
    It's a small point, but you don't really want to be snowed under with ten zillion replies of "I canny get this to work", only to have to get back with "there is more text hidden off to the far right of the box".
    Also, your instructions are "do this, do that" without a wee word of explanation. Again, I'm skating on thin ice here: I do appreciate your efforts and you've helped me on a few ocassions in the past, but others might like to be
    let in on the secret of what each steps involves.
    Part of your instructions involves changing one column in the report, and then you say "Add Link Column to report and set Link Text".
    What does this mean:
    1) Add a NEW column to the report
    2) Keep editing the CURRENT column since there's no "save the changes" instruction
    There's two mentions of setting "Standard Report Column", so does this imply there are two distinct columns?
    You say 'Create dynamic Action "Set Dialogs". Select Advanced' - I create a dynamic action, have to make a choice between Standard and Advanced and
    then am presented with the dialog asking for the name of this new dynamic action. How about rephrasing as 'Create a new Dynamic Action; select "Advanced", enter the name as "Set Dialogs" '.
    The sequence is important; if I have to re-read, re-parse and re-order a sentence then it becomes frustrating for us already struggling with the technology.
    The menu choice of "None" to "Selection Choice" is not visible to me.
    I followed your instructions but nothing seems to happen - I guess my choice of the "Add Link Column" was the wrong one, hence I will go back
    and play with that.
    Although you may not believe me, sincere thanks for your efforts. My comments above are meant to reduce the volume of follow-up feedback that you may experience from your work.
    Ta again Jari
    Mungo

  • Deadlock between "Save as" dialog box and another popup window in Firefox

    I have only seen this problem with recent versions of Firefox on Mac OS X, and I have run into it several times in the last few months (I am using Firefox 9), where Firefox seems to get into a dead-lock, and I can't find anyway round this except killing and restarting Firefox.
    The dead-lock happens when I am in the "Save as" dialog box -- i.e. the popup when I try to save something. If I get a pop-up window warning me that the script on some webpage is unresponsive, this leads to a dead-lock. The reason is this popup expects a response from me -- to stop or let the script continue, but it is unable to accept my response, I assume because the "Save As" dialog box has the focus, but I am unable to continue with the "Save As" dialog (I simply get a beep if I press the save or cancel buttons), presumably because of the "unresponsive" popup is expecting my response.
    I don't know if the "unresponsive script" popup happens because I am taking too long with the "Save As" dialog, or if it is prompted by the script from another page (I have many tabs opened)
    Is there anyway to get around this without killing the Firefox process? Also, can this problem be fixed so that the dead-lock does not occur?

    As I said, the problem is not because Firefox is hanging, or because I cannot save my files. It is happening because the "unrespnsive script" popup is allowed to occur while I am in the "Save As" dialog -- i.e. I have chosen to save something, e.g. a web page, and this prompt the "Save As" dialog, i.e. where I specify the file name and where to save to -- this is working fine.
    However, when you are in the "Save As" dialog, the "Save As" window is the only window of Firefox that you can interact with. However, if the "unresponsive script" popup window happens to pop-up when you are inside the "Save As" dialog (which does not occur very often, and I have not encounter it except on recent versions of Firefox o the Mac; I have used Firefox on Windows and Linux for many years), then you get into this dead-lock, because you cannot answer the "unresponsive script" pop-up (i.e to continue or terminate the script), as you cannot interact with the new pop-up window, but at the same time, you cannot continue with the "Save As" dialog -- you can interact with the "Save As" window (i.e. press buttons etc.), but the actions are ignored.
    To be clear, what I suspect I am seeing is a bug in the User interface code for the Mac version of Firefox.
    I have noticed yesterday that I got an "unresponsive script" pop-up on the Windows version of Firefox immediately after I have finished my "Save As" dialog. I have no way of being certain (unless I look at the code), but my guess is that the "unresponsive script" pop-up was delayed until after I finished the "Save As" dialog on the Windows version, i.e. option 3 in my previous post, but this does not seem to happen on the Mac version.

  • Refresh only page item while submitting data from the popup window

    Hi All,
    I'm pretty new to Apex .....
    I have a form with text items as first few entries and then a radio button list and few text items again. On selecting certain radio button I have a popup window which acts as an interface for the next text item in the calling page. The purpose of having the popup window is that the text item following the radio button takes the input with certain character delimiters along with the data. Instead of using delimiters while entering the data I want a meaningful data to be keyed in the popup window and all the string operation to be done as a background process. I have been successful this far. I'm using the below javascript on click of the submit button.
    javascript:doSubmit();
    window.opener.doSubmit('REFRESH');
    window.close();
    On doing this I'm losing the values submitted for the items prior to the radio button(including radio button). Please note, I have a dynamic action set on page load to reset the values. Is it possible to refresh just the page item from the popup window.
    Also, I tried excluding the window.opener.doSubmit('REFRESH'); from the above javascript. It sets the item with the expected value (viewed it in the session items, however I would like to view the concatenated string on my calling page) but following this there is an insert operation which uses all the necessary items in the form. All values except the value returned from the popup window is populated into the table. Am I missing something.
    Any help in this regard is appreciated.
    Thank you!!!
    Regards,
    Ganesh

    Value set using Javascript is only in your browser page but is not yet available in the session. This is why the report doesn't return the expected output.
    Before refreshing the report you would need to set the session state of this item.
    You can set it after you assign the item a new value or before the report is refreshed
    For Interactive Reports, this is available built in
    you can go to Report Attributes >Advanced Attributes -> Page Items to Submit and specify P2_X1 for the field(and any other page item that the report is dependent on)
    For standard reports, you can create a Dynamic Action that is triggered "before refresh" of the report's region, and choose PLSQL as the action types, give a dummy BEGIN NULL END; for the code and specify this item name in the page item to submit field so that it sets the items's value in session.

  • Popup window  opens in the second page  - plz help gurus.

    Hi All,
    I'm calling a transaction through ITS. There is a hyperlink in a report brings up PDF in the popup window. Popup window comes up in the second page of the report after closing in the first page of the report. Popup comes in all the consecutive pages of the report once I click on the hyperlink. This is really frustrating. Pls let me know if i need to do any configuration to avoid this problem. 
    Thanks,
    Kumari

    Hello Kumari,
    are you using the SAP GUI for HTML (webgui)? Normally, no hyperlinks are used except on documents inside an HTMLviewer (like in TX TRIP), or when Drag & Relate is activated.
    I suppose the link is part of a document that is shown in an HTMLviewer. Though this document does not belong to the ITS or the SAP GUI for HTML it uses ITS's URLs to address a new page or document. But, with this URL the status of the ITS or the application does not change, thus showing the popup over and over.
    If you have a tool to trace the HTTP protocol you can check for the URLs that are send on a particular action. I
    Best regards,
      TJ

  • TIP: Building Modal Popup Windows

    Build Modal Popup Pages
    Introduction
    The following is based on the 'How To Document' - 'Build Custom Popup Pages'.
    This How To will show the developer how to create Modal Popup windows with the ability to pass information back to the parent window.
    Example Scenario
    The example described in this how to adds a custom modal popup LOV to a form on the SCOTT.EMP table. Clicking the popup LOV link on the form page will popup a Modal LOV page that allows users to search by ENAME, JOB, and SAL. Selecting a value from this LOV page will close that popup LOV page and populate the ENAME, JOB, and SAL fields on the form page with the selected values. Additionally, had the user entered some data into the ENAME, JOB, and/or SAL fields on the form page, that data would be used in the initial search when the popup LOV page is first shown.
    Step 1 - Create a simple form page on SCOTT.EMP
    To create the form page, simply step through the HTML DB "Form on a Table or View" wizard against the EMP table accepting the defaults. For this example, create the form with a page number of one, and make sure to allow the ename, job, and sal fields to be editable. When the wizard completes, page 1 of the application should have the items P1_ENAME, P1_JOB, and P1_SAL on it as text fields.
    Step 2 - Create a popup page with search fields
    Next, create a page that's to be used as the popup window: Page 2. Ultimately, this page will have javascript, a report region, and some buttons. For now, though, just create a page 2 with the items P2_ENAME, P2_JOB, and P2_SAL on it as text fields.
    Step 3 - Set Modal popup page header requirements
    A) Modal windows by default cache the information they display. When creating a popup window which displays different information each time it is called or to allow searching the caching default must be switched off.
    Add the following meta-tag to the "HTML Header" field of the page-level attributes screen for page 2 to accomplish this:
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    B) Modal windows by default open a new window when running any redirect calls. When creating a modal popup which passes back parameters to the parent window. The modal window has to be forced to fire redirect calls within its own window rather than open a new window for the redirect.
    Add the following tag to the "HTML Header" field of the page-level attributes screen for page 2 to accomplish this:
    <base target="_self">
    Step 4 - Add Javascript call to the popup page
    Because the popup page should filter its result set based on any values that the user might have entered onto the form page, you need to add a javascript function that would pass those values off. Add the following function to the "HTML Header" field of the page-level attributes screen for page 1 to accomplish this:
    <script language="JavaScript" type="text/javascript">
      function callMyPopup (formItem1,formItem2,formItem3) {
        var formVal1 = document.getElementById(formItem1).value;
        var formVal2 = document.getElementById(formItem2).value;
        var formVal3 = document.getElementById(formItem3).value;
        var url;
      url = 'f?p=&APP_ID.:2:&APP_SESSION.::::P2_ENAME,P2_JOB,P2_SAL:' + formVal1 + ',' + formVal2 + ',' + formVal3 ;
      // IE Browsers modal popup window
      if (window.showModalDialog) {
        w = showModalDialog(url, window.self,"status:0; scroll:1; resizable:1; dialogWidth:25; dialogHeight:43");
        // w is an array returned from the modal popup containing the passback values
        if (w) {
          document.getElementById("P1_ENAME").value = w[0];
          document.getElementById("P1_JOB").value = w[1];
          document.getElementById("P1_SAL").value = w[2];
          document.getElementById("P1_SAL").focus();
      else {
      // mozilla based browsers modal popup window
      w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600", modal="yes");
      if (w.opener == null)
        w.opener = self;
      w.focus();
    </script>Though you don't need to know how to read javascript for this example, it helps to understand that this function only does one important thing: it opens a modal popup window of page two in our application while passing values to P2_ENAME, P2_JOB, and P2_SAL. It gathers those values to pass from the names of the HTML DB items provided to it. The call to this function will be added in the next step below.
    Step 5 - Add a popup link next to the P1_SAL field on the form page
    Add a link to the form page that will call the callMyPopup function above and pass it the values it needs. To do so, place the following HTML in the "Post Element Text" field attribute of the P1_SAL item:
    <~a href="javascript:callMyPopup('P1_ENAME','P1_JOB','P1_SAL');">Click for LOV<~/a>NB. remove ~ from above when deploying
    Step 6 - Add the LOV report to the popup page
    The next step is to create a report on the popup page based on the values passed from the form on page one. The tricky part of this report is providing a means for the selected values to be passed back to the form page. This can be achieved by having a column of the report render as a javascript link that would close the popup window and pass the ename, job and sal values for that row back. Start by adding a simple report region to our Modal popup page that uses a query such as:
          select ename, job, sal , 'placeholder' the_link
            from emp
           where ename like '%'||:P2_ENAME||'%'
             and (job = :P2_JOB or :P2_JOB is null)
             and (sal = :P2_SAL or :P2_SAL is null)Note that the last column in this query is just a placeholder. once the region is created, turn that placeholder into a link by doing the following:
    Navigate to the Page Definition for page 2
    Next to the name of the report region created in step 6, Click Q
    Next to the column THE_LINK, click the edit icon
    In the "Link Text" field enter the string "select"
    In the URL field enter: javascript:passBack('#ENAME#','#JOB#','#SAL#'); Click the "Apply Changes" button
    Step 7 - Add the javascript function to the Modal popup page to pass selected values to the (parent) form page.
    In the previous step you added a call to a javascript function, passBack. Now add that function to the top of Modal popup page 2. In the same manner as step 4 above, add that passBack function to the page 2 by putting it in the "HTML Header" field of the page-level attributes screen. The function should look similar to the following:
    <script language="JavaScript">
       function passBack(passVal1, passVal2, passVal3)
         // IE Browser return the passback values in an array
         if (window.showModalDialog) {
           var retVal = new Array(passVal1, passVal2, passVal3);
           window.returnValue = retVal;
           window.close();
         // Mozilla based browsers right the passback values directly into the parent window
         else {
           opener.document.getElementById("P1_ENAME").value = passVal1;
           opener.document.getElementById("P1_JOB").value = passVal2;
           opener.document.getElementById("P1_SAL").value = passVal3;
           opener.document.getElementById("P1_SAL").focus();
           close();
    </script>This function simply sets the values of P1_ENAME, P1_JOB, and P1_SAL with the values of the whatever's stored to the three HTML DB item names passed to it. It also closes the current window and puts the cursor back into the P1_SAL field.
    Step 8 - Polishing
    The basic functionality of this custom modal popup window has been created in steps 1 though 7. To make its usage a little more friendly, it's advisable to add Cancel and Search buttons to the popup window page. The Search button should just be added as a regular button that branches back to the page 2. Adding this button allows users to re-query for LOV options without having to return to our form page. The Cancel button should be created with an "Action" of "Redirect to URL". The "URL Target" of the button should be javascript:window.close(). As the code suggests, the Cancel button would just close the popup window (with no values returned).
    Hope this is of use....

    Everything said above is working fine but in Mozilla small popup is coming in top left corner of browser..
    so please help me so that it is opened in proper width and height in mozilla.

Maybe you are looking for

  • How do I add a video clip after my music?

    Its sort of a wierd question but basically to me imovie09 is a bust since i cant really see a real timeline to edit my project. But what im trying to do is after i edited my video and the song i have ends i want to add another clip after the song but

  • How to test the parameter new_active_sess_pool_p1

    Dear all, How to test the parameter new_active_sess_pool_p1? I have set the new_active_sess_pool_p1=1,and I login db using the user HXL,execute DML and make sure the session is active,now i login the db again and found the new_active_sess_pool_p1 not

  • Converting from PS single app plan to Photography Special Offer plan

    Hi, Just wondering how I can convert from my PS single app plan @ $19.99/month to the photography special offer plan, which includes PS and LR @ $9.99 month. Thanks Regards Ro

  • Active mode multiple selection in dialog screen

    in my dialog screen i had multiple selection option button by using the below function module. CALL FUNCTION 'K_CMPERS_MULTIPLE_SELECTION'   EXPORTING     P_FIELDTYPE         = 'R'     P_FIELDNAME         = 'MATNR'     P_TABLENAME         = 'MARA'  

  • System Recovery...Need to Deactivate CS3???

    Before I perform a system recovery (clean back to factory settings) do I need to perform Adobe CS3 Deactivation in order to install on the same computer, once recovery is complete? Thanks ahead of time!! ~Kate