How to close Apex Modal page from iframe? - javascript

I have an Apex 19.2 page. Inside the page there is an iframe from another page of the same application.
Once some process are successful inside the iFrame, I would like to allow the user to close the modal page by clicking a button inside the iFrame.
I tried a dynamic action with Close/Cancel dialog but it's not working.
Has anyone an idea how to do that please ?
Thanks,
cheers,
.

Here is the solution.
From the iFrame :
parent.apex.navigation.dialog.close(true)

Related

How to add iframe element tag in dialog popup using html

I want to add an iframe inside a pop up dialog. How can I add it inside this dialog popup using JavaScript.
Here is the dialog pop inside which I want to use an iframe.
Here is the Iframe tag that I want to show inside the popup. You can add any website in iframe. Thanks in advance for your help.
<iframe src="http://www.w3schools.com"></iframe>
You cannot display google.com inside an iFrame. Reason being that Google sends an "X-Frame-Options: SAMEORIGIN" response header. This option prevents the browser from displaying iFrames that are not hosted on the same domain as the parent page. This is a security feature to prevent click-jacking. Details at How to show google.com in an iframe?
EDIT after the 1st comment below:
I assume you want to load the iframe inside the dialog when "New Dialog" button is clicked. Can you try doing this:
last=$(<div/>").dialog(dialogOptions).dialogExtend(dialogExtendOptions).load("https://www.html5rocks.com/en/tutorials/cors/");
Updated fiddle : https://jsfiddle.net/rwk1Ljcy/1/

Open Extrernal HTML page inside Angular Dialog

I am working on single Page application with Angular and Bootstrap.
At the top of the application there is button HELP. When user will click, Popup should be open with Help Content which is another HTML file.
Using ngDialog i am able to display the external Help Html file inside the dialog. But this HELP HTML file contains few hyperlink for navigation. So when i clicked those hyperlink , the main application's url is getting changed instead of changing in the HELP HTML page inside the dialog.
Any reference or help on this issue ?

FancyBox: open new page

I have a very simple webpage called a.html where I want to click on an image and I want a modal window to be opened, loading the content from b.html#main instead of from the main div from the a.html webpage.
How can I do this?
Thanks a lot in advance!
Check out the "iframe" option. There's some code here on the fancybox Howto page.
Cheers,
Al

Twitter share page does not open in an iframe

I'm trying to open the Twitter share URL http://twitter.com/share?url=http://google.com&text=Google using Highslide iframe http://highslide.com/ref/hs.objectType
But the Highslide popup has no content!
Anybody knows what seems to be the problem?
The page has code specifically to prevent you from displaying it in a frame. The page is only made visible if it detects that it's not inside a frame.
So, you shouldn't put it in an iframe.

solution for popup page as modal

I was using window.showModalDialog() but doesn't work on all browsers.
People recommends me jquery, thickbox and also this contact Example
but the problem is when i submit the page, server will send me another page, and that page will replace my original page!
so actually it doesn't fulfill my requirement.
My requirement is on button click modal page should open and it can redirect to other page on same window without disturbing my original page and when I close My original page get reflections.
So is it possible?
Sounds like you need a simple html target="_blank" in the link to the other page.
http://www.htmlcodetutorial.com/linking/_A_TARGET_95y98y108y97y110y107y.html

Categories