This discussion is archived
13 Replies Latest reply: Jun 11, 2012 3:01 AM by Gurujothi RSS

create a pop window or hovering window

manyam16 Newbie
Currently Being Moderated
Hello,
I need to create a pop window/region when I click on a link in the current page. For example, I am displaying the employee data in the current report page, there is a link for the deptno column, when I click the deptno column, it should display that department details as a pop window. any suggestions how todo this.
thanks
  • 1. Re: create a pop window or hovering window
    VC Guru
    Currently Being Moderated
    Create this javascript function in your page header (lets say page 1)
    <script language="JavaScript" type="text/javascript">
      function callMyPopup(pUrl) {
      w = open(pUrl,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
      if (w.opener == null)
      w.opener = self;
      w.focus();
      }
    </script>
    Create a report page with the dept details (lets say page 2)

    In page one dept link select the link type as JavaScript URL and enter the below line in URL field
    javascript:callMyPopup('f?p=&APP_ID.:2:&APP_SESSION.::NO::P2_SAMPLE_ITEM:#DEPTNO#');
    Please note that in the above link we are sending current deptno as parameter, so that it can be used in the target report page (2) to filter the details
  • 2. Re: create a pop window or hovering window
    manyam16 Newbie
    Currently Being Moderated
    Thank you VC, I did exactly the same. created two pages, deptno in both the pages have the same name as deptno. hence i used the following:

    URL link: javascript:callMyPopup('f?p=&APP_ID.:3:&APP_SESSION.::NO::DEPTNO:#DEPTNO#');

    html header:
    <script language="JavaScript" type="text/javascript">
    function callMyPopup(pUrl) {
    w = open(pUrl,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
    if (w.opener == null)
    w.opener = self;
    w.focus();
    }
    </script>

    I am getting the error: ERR-1002 Unable to find item ID for item "DEPTNO" in application "40740".
    Not sure what mistake I am doing.
    Thanks --
  • 3. Re: create a pop window or hovering window
    VC Guru
    Currently Being Moderated
    manyam16 wrote:
    Thank you VC, I did exactly the same. created two pages, deptno in both the pages have the same name as deptno. hence i used the following:

    URL link: javascript:callMyPopup('f?p=&APP_ID.:3:&APP_SESSION.::NO::DEPTNO:#DEPTNO#');
    You need to understand the URL syntax of APEX, because in the above url you are passing the deptno value from teh report column(#DEPTNO#) into an page/application item called DEPTNO.
    Look tat this http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/concept_url.htm#HTMDB03017

    Does any apex item exists with name DEPTNO?

    If not create a item called P3_DEPTNO on page 3.

    And change the url to this
    javascript:callMyPopup('f?p=&APP_ID.:3:&APP_SESSION.::NO::P3_DEPTNO:#DEPTNO#');
    html header:
    <script language="JavaScript" type="text/javascript">
    function callMyPopup(pUrl) {
    w = open(pUrl,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
    if (w.opener == null)
    w.opener = self;
    w.focus();
    }
    </script>

    I am getting the error: ERR-1002 Unable to find item ID for item "DEPTNO" in application "40740".
    Not sure what mistake I am doing.
    Thanks --
  • 4. Re: create a pop window or hovering window
    manyam16 Newbie
    Currently Being Moderated
    Thank you Vic, I did exactly the same. But I used the same column name 'DEPTNO' on both pages. I changed this to P3_DeptNo on page 3, then it worked.

    I would like to know is there any other way to show the pop windows, can we do with regions.
    Thanks-
  • 5. Re: create a pop window or hovering window
    VC Guru
    Currently Being Moderated
    You can do, but not popup you should use jquery dialog.

    Replace REGION_STATIC_ID with the actual value of the region static id of your region
    $(function () {
         $('#REGION_STATIC_ID').dialog({
              modal : true,
              autoOpen : true,
         })
    });
  • 6. Re: create a pop window or hovering window
    Gurujothi Explorer
    Currently Being Moderated
    Hi VC,
    To get this to work I have to create whic report?
    Interactive or Classic and
    you said
    In page one *dept link* select the link type as JavaScript URL and enter the below line in URL field <--Dept link means??
    what is this page(page1)? Form or report?

    Thank you.

    Edited by: Gurujothi on Jun 8, 2012 4:03 AM
  • 7. Re: create a pop window or hovering window
    VC Guru
    Currently Being Moderated
    You can do it in both classic and interactive report
  • 8. Re: create a pop window or hovering window
    Gurujothi Explorer
    Currently Being Moderated
    Hi VC,
    In which page I should put that javascript code?
    and what Dept link means?
  • 9. Re: create a pop window or hovering window
    VC Guru
    Currently Being Moderated
    Gurujothi wrote:
    Hi VC,
    In which page I should put that javascript code?
    On the report page
    and what Dept link means?
    On the report column where you want to create the link
  • 10. Re: create a pop window or hovering window
    Gurujothi Explorer
    Currently Being Moderated
    Hi VC,
    am using interactive report, but I coudn't found anything link and to select the " link type as JavaScript URL"

    actually there is one region in the interactive report called,*Column Link*

    There I found "Link text" when I clicked the Serch Icon there I found only the report items,
    Sorry I coudn't found, please tel me where to find that?
    Thank you.
  • 11. Re: create a pop window or hovering window
    VC Guru
    Currently Being Moderated
    Gurujothi wrote:
    Hi VC,
    am using interactive report, but I coudn't found anything link and to select the " link type as JavaScript URL"

    actually there is one region in the interactive report called,*Column Link*

    There I found "Link text" when I clicked the Serch Icon there I found only the report items,
    Sorry I coudn't found, please tel me where to find that?
    Edit your page that has IR report > go to report attributes > Edit your column that you want to create link > click on link tab or scroll down to Column Link

    I strongly recommend you to spend half day on this document and understand http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_rpt_int.htm#CHDEFABF
  • 12. Re: create a pop window or hovering window
    Gurujothi Explorer
    Currently Being Moderated
    Hi Manyam16,
    I also getting the same error,
    ERR-1002 Unable to find item ID for item "P446_EMP_NAME" in application "113".
    Unexpected error, unable to find item name at application or page level.
    May I know How to solve this?
    Thank you.
  • 13. Re: create a pop window or hovering window
    Gurujothi Explorer
    Currently Being Moderated
    Hi Manyam16,
    I have created the ITEM Called P446_EMP_NAME on page 446 and the issue is solved,but when I am clicking the Emp_name i.e Guru in the report am getting the all Employee details details from the other page instead of getting the Employee details whose name is Guru.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points