Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calling an APEX modal page from a text link

LauryDec 14 2018 — edited Jan 21 2019

Hi,

I am working with APEX 5.1.

I have a PL/SQL dynamic regiion defined with:

declare

    v_page        number := 203;

begin

    htp.p('What next?' || ' <a href="javascript:PopUpModalPage(' || v_page || ');"><font size="2" color="FireBrick"><b>See here</b></font></a>');

end;

I want that, when the user click on the link "See here" and APEX modat page is displayed.

I have the following Javascript function:

function PopUpModalPage(vPageID)

{

var url;

var urlname;

urlname = "WhatsNext";

url = 'f?P=&APP_ID.:'+ vPageID + ':&APP_SESSION.:::::';

mywindow = window.open(url, urlname, "dialogWidth=900px, dialogHeight=300px");

mywindow.moveTo(10, 10);

};

But it returns me the errors:

Application 102 Dialog page 203 cannot be rendered successfully.

Ensure the page template in use on page 203 is of template type "Dialog page",

with appropriate JavaScript dialog initialization, dialog closure and dialog cancel code defined.

My Javascript knowledge is rather limited... does someone know how by clicking "See here" and APEX modat page can be displayed?

Is there maybe a more elegant way to achieve this result than by calling a Javascript function?

Thanks by advance for any tip(s).

Kind Regards

This post has been answered by Franck N on Dec 14 2018
Jump to Answer
Comments
Post Details
Added on Dec 14 2018
6 comments
760 views