Atozed Forums

Full Version: Popup window
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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)?
(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/...odalWindow
(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/...odalWindow

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?
"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?
The English version in Chrome and Internet Explorer:
(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.