This discussion is archived
6 Replies Latest reply: Feb 16, 2013 4:42 AM by Mahmoud_Rabie RSS

tree to popup a called page

Gor_Mahia Explorer
Currently Being Moderated
all,
Ive created a tree structure and i want it to popup the called page but my code below gives error can somebody help please,
select case when connect_by_isleaf = 1 then 0
            when level = 1             then 1
            else                           -1
       end as status, 
       level, 
       '<SPAN style="color:red;">' || "ENAME" || '</SPAN>'  as title, 
       (case when level = 1 then '#IMAGE_PREFIX#Fndtre11.gif' 
             when level = 2 then '#IMAGE_PREFIX#Fndtre12.gif'
             else '#IMAGE_PREFIX#Fndtre13.gif' end) icon, 
       "EMPNO" as value, 
       null as tooltip,  
'<a href="javascript:popUp2('''
                  ||
  'f?p=&APP_ID.:14:&SESSION.::::P2_EMPNO,P14_SELECTED_NODE:'||empno||','||empno 
 || ''', 700, 700);">'
                  || '</a>'  as link
from EMP
start with "MGR" is null
connect by prior "EMPNO" = "MGR"
order siblings by "ENAME"
thank you.
  • 1. Re: tree to popup a called page
    Mahmoud_Rabie Journeyer
    Currently Being Moderated
    Hi Gor,
    i want it to popup the called page but my code below gives error
    1) What is the link of popup page?
    2) What is the error?
  • 2. Re: tree to popup a called page
    Gor_Mahia Explorer
    Currently Being Moderated
    Mahmoud
    below is the link also the error. somehow when i include the link here in the code block its cutoff so i added it below
    select case when connect_by_isleaf = 1 then 0
                when level = 1             then 1
                else                           -1
           end as status, 
           level, 
           '<SPAN style="color:red;">' || "ENAME" || '</SPAN>'  as title, 
           (case when level = 1 then '#IMAGE_PREFIX#Fndtre11.gif' 
                 when level = 2 then '#IMAGE_PREFIX#Fndtre12.gif'
                 else '#IMAGE_PREFIX#Fndtre13.gif' end) icon, 
           "EMPNO" as value, 
           null as tooltip,  
    '<a href="javascript:popUp2('''
                      ||
      'f?p=&APP_ID.:14:&SESSION.::::P2_EMPNO,P14_SELECTED_NODE:'||empno||','||empno 
     || ''', 700, 700);">'
                      || '</a>'  as link
    from EMP
    start with "MGR" is null
    connect by prior "EMPNO" = "MGR"
    order siblings by "ENAME" 
    
    
    rror 500--Internal Server Error
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.5.1 500 Internal Server Error
    
    The server encountered an unexpected condition which prevented it from fulfilling the request.
    —--------—------------------
    
    
    
    href="javascript:popUp2('''
                      ||
      f?p=&APP_ID.:14:&SESSION.::::P2_EMPNO,P14_SELECTED_NODE:'||empno||','||empno 
     || ''', 700, 700);">
    thank you

    Edited by: Gor_Mahia on Feb 9, 2013 9:38 AM

    Edited by: Gor_Mahia on Feb 9, 2013 9:41 AM
  • 3. Re: tree to popup a called page
    Mahmoud_Rabie Journeyer
    Currently Being Moderated
    Gor,

    please, unlock the account
    proj2010
    demo123/demo123

    and what is the application number / page number containing this region?

    Regards
    Mahmoud
  • 4. Re: tree to popup a called page
    Gor_Mahia Explorer
    Currently Being Moderated
    Mahmoud
    Sorry i left it opened since friday and i thought you were done, its unlocked now.
    proj2010
    demo123/demo123

    and what is the application number / page number containing this region?


    App=760,page2, Region=test tree.

    Thanks & Regards
  • 5. Re: tree to popup a called page
    Gor_Mahia Explorer
    Currently Being Moderated
    Mahmoud
    pls let me know if you are still interest at looking at this this but ive not resolved it though...regards
  • 6. Re: tree to popup a called page
    Mahmoud_Rabie Journeyer
    Currently Being Moderated
    Gor,

    Yes I am interested.

    I think you should use popupURL instead of popUp2

    Please, try the following code
    select case 
                     when connect_by_isleaf = 1 then 0
                     when level = 1             then 1
                     else                           -1
               end as status, 
               level, 
               "ENAME" as title, 
               (case 
                         when level = 1 then '#IMAGE_PREFIX#Fndtre11.gif' 
                         when level = 2 then '#IMAGE_PREFIX#Fndtre12.gif'
                         else '#IMAGE_PREFIX#Fndtre13.gif' 
                end) as icon, 
           "EMPNO" as value, 
            null as tooltip,  
            'javascript:popupURL(''f?p='||:APP_ID||':14:'||:APP_SESSION||':::P2_EMPNO,P14_SELECTED_NODE:'||empno||','||empno || ''');' as link
    from EMP
    start with "MGR" is null
    connect by prior "EMPNO" = "MGR"
    order siblings by "ENAME"
    If the question is answered, please the thread as answered and give the points where earned ...

    If you have a problem in implementing yourself and need help then :
    Open the lock and don't close it anymore
    It is not your home door
    ;)

    Regards
    Mahmoud

Legend

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