How can I create a button or link that can open URL in popup?

I am making 2 application form, one for search BPM data of a process and one for detail screen.

On the search screen, I want to make a link button that open the detail form in popup window.

I made a custom button for that, but the onclick attribute unable to replace the variable with the value.

The code is as below: (I replace HTML symbol '<' and '>' with '[' and ']' to be able for it to be displayed properly)

[a class="ng-binding btn btn-info"
   ng-click="{{header.answer_onclick}}"
   onclick="{{header.answer_onclick}}"
]{{header.name}}[/a]

The value of "answer_onclick" is:

"window.open('/bonita/apps/Search/Detail?id=1','popup','width=600,height=800');"

We can also test with something like:

"window.open('https://www.google.com','popup','width=600,height=800');"

When I run the form and inspect the generated HTML code, the part of "onclick" was not replaced, and if I remove it, the "ng-click" part did not work. the generated HTML is as below.

[a class="ng-binding btn btn-info"
   ng-click="window.open('/bonita/apps/Search/Detail?id=1','popup','width=600,height=800);"
   onclick="{{oneRecord[header.answer_onclick]}}"
]Detail Data[/a]

How can I make this work?

Thanks

Hi,

You can try to use the LivingApplicationIFrameV4 custom widget packaged with the Bonita Layout page (can be retrieved from the Studio Welcome page when import the User App) and a modal container in the UID.

Note that accessing an external website in an iframe will get blocked by web browser security policies (eg: https://www.google.com)

HTH
Romain