Link open in a popup

Hi, i have a button for an external link. how can I add a code to open the link in a popup and not in a new site?
Thanks for your help.

Hi Ralf @RME

I hope the below example will prove useful.
It is not a popup but a modal though should do the trick.

Open Website in Modal-1.bloc (724.8 KB)

MDS

hi @MDS that’s good. The problem is I have to open these script in a popup or modal.

> <div id='tfw-calendar-app' data-base_url='www.traum-ferienwohnungen.de' data-startMonth='0' data-numberOfMonths='6' data-listingid='24277'><a id='calendar-link' href='https://traum-ferienwohnungen.de/24277'>Ferienwohnung "Seebachtal" auf traum-ferienwohnungen.de</a></div><script async src="https://static2.traum-ferienwohnungen.de/vmb-public/cache/js/calendarWidget.js" type='application/javascript'></script>

And the modal should have a close button :slight_smile:

Hi Ralf @RME

So it is not just an external link. What is the script purpose ?

Yep I initially had the modal full width and thus when you click outside the modal it closes. Reason why there is no close button. I wil add one tomorrow if I have time.

MDS

1 Like

Hi Ralf @RME

Here is the updated file.

Open Website in Modal_2.bloc (202.1 KB)

You have got your close button and the script that opens in the modal.

You will have to style for the other breakpoints but now it works fine I believe.

MDS

1 Like

Hi @MDS das ist fantastisch. Thanks. :heartbeat:
You did make a row with a code section. But I can’t see the bloc. How did you do that?

Hi Ralf @RME

You’re welcome.

Once you apply the default modal class to the row it hides itself. But you can always edit the code widget by selecting it on the right hand side. Or you can temporarly remove the modal class applied to the row.

MDS

2 Likes

Hi Ralf @RME

The modal I originally created no longer works, i.e. not displaying the calendar. It used to work and I have checked other sites using this api and found out that their link is also broken, no longer displays the calendar. For instance for http://www.ferienwohnung-droemmeljan.de

00

I am also under the impression that https://www.traum-ferienwohnungen.de/ have updated their site. So you may want to check the api and script to see if they have perhaps modified it as well. This would explain why the modal is no longer working as it did in the very beginning.

MDS

hey, thanks for your message. yes, they updated the site.I ll have a look.

PS: what’s your real name? :slight_smile: