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!

ApEx 4.2: how to close jQuery modal dialog?

GrizzledFeb 26 2015 — edited Mar 2 2015

I'm experimenting with modal popups in the style of the 5.0 sample app "Product Order Tree" and I was able to get a form page to come up when clicking a tree node by adding a div to the page footer like this:

<div id="modalPopup" style="display: none;"></div>

and making the tree query link column return:


'javascript:$("#modalPopup").load("f?p=' || V('APP_ID') || ':2:' || V('APP_SESSION') || '::::P2_ROWID:' || rowid || '").dialog({ title: "Test", width:''800'', height:''480'', modal: true });'

What I currently can't figure out is how to make the popup disappear cleanly when clicking the Cancel button of the popup form. I connected a dynamic action with javascript to the button and I can make it empty and hide the modalPopup div with basic javascript commands but that leaves the title bar of the dialog on the screen. Any jQuery syntax I tried, like $("#modalPopup").dialog( "close" ); or $("#modalPopup").close(); does nothing.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 30 2015
Added on Feb 26 2015
5 comments
2,085 views