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