Atozed Forums
Popup window - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Popup window (/thread-2396.html)



Popup window - Comograma - 05-10-2021

Is it possible, by clicking a button, open a popup window (modal window) which the content of that popup is a external page (external link)?


RE: Popup window - PaulWeem - 05-11-2021

(05-10-2021, 04:31 PM)Comograma Wrote: Is it possible, by clicking a button, open a popup window (modal window) which the content of that popup is a external page (external link)?

See this example:

https://github.com/Atozed/IntraWeb/tree/master/XIV/Delphi/ModalWindow


RE: Popup window - Comograma - 05-11-2021

(05-11-2021, 07:47 AM)PaulWeem Wrote:
(05-10-2021, 04:31 PM)Comograma Wrote: Is it possible, by clicking a button, open a popup window (modal window) which the content of that popup is a external page (external link)?

See this example:

https://github.com/Atozed/IntraWeb/tree/master/XIV/Delphi/ModalWindow

Thanks!! I'd try the example but when I hit button "Show another site", passing my site link do the function ShowSite(), like this:
ShowSite('This is Atozed''s Blog', 'https://www.comograma.pt');

nothing is shown, I get an empty window. See attachement. Why is that happening?


RE: Popup window - kudzu - 05-11-2021

"I get an empty window"

Its not quite empty. Since I cannot copy the text to translate, can you please translate the error displayed in the window for me?


RE: Popup window - PaulWeem - 05-13-2021

The English version in Chrome and Internet Explorer:


RE: Popup window - Alexandre Machado - 05-14-2021

(05-10-2021, 04:31 PM)Comograma Wrote: Is it possible, by clicking a button, open a popup window (modal window) which the content of that popup is a external page (external link)?

Precisely responding your question: Only with JavaScritp code attached directly to an user initiated event, like a onclick of a button.

Browsers will allow a popup window *if* it is directly initiated by the user (e.g. the user clicked on a button).

If the button click generates a request that goes to the server and comes back with some code that tells the browser to open a popup, then it will block it.

That's how it works.