Popup window

<< Click to Display Table of Contents >>

Navigation:  Forum >

Popup window

Forum link

 


 

05-10-2021, 04:31 PM:

 

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-11-2021, 07:47 AM:

 

(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, 10:10 AM:

 

(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?

 


 

05-11-2021, 07:00 PM:

 

"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?

 


 

05-13-2021, 11:07 PM:

 

The English version in Chrome and Internet Explorer:

 


 

05-14-2021, 06:57 AM:

 

(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.