Display Web page in popup

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
atostaine
Posts: 413
Joined: Wed Jan 20, 2016 7:38 am

Display Web page in popup

Post by atostaine » Fri Apr 12, 2019 5:42 am

I have a tracking# in a list. I want the user to be able to click on the tracking# and show a popup with a web page. I tried to follow the sample to display PDF's but I think that's just to show static content.

I need to navigate to a URL like https://www.ups.com/track?loc=en_US&tra ... ackdetails

I don't want to use sys_web.navigate if I don't have to. That opens a new tab.

I tried prim_web.urlParameter and some others but none of them navigated to the URL.

Thanks
Art Tostaine

JamesDuignan
Posts: 64
Joined: Thu Nov 26, 2015 1:43 pm

Re: Display Web page in popup

Post by JamesDuignan » Fri Apr 12, 2019 11:47 am

Hi Art,

It looks as if UPS site does not allow it to be embedded in a page so the use of prim_web.page or prim_web.HTML to us an iFrame in a LANSA pop up or dialog are not suitable for this.

But it can be achieved by sending the url to a widget to open a new popup window see attached.
QuickExportArt.zip
(15.92 KiB) Downloaded 123 times
It just uses a simple bit of js to open the page in a new window.

Code: Select all

  window.open(myurl, "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,top=500,left=500,width=400,height=400");
Regards,
James

atostaine
Posts: 413
Joined: Wed Jan 20, 2016 7:38 am

Re: Display Web page in popup

Post by atostaine » Fri Apr 12, 2019 10:48 pm

Thank you. How did you find out that UPS doesn't allow it to be embedded?

Art
Art Tostaine

JamesDuignan
Posts: 64
Joined: Thu Nov 26, 2015 1:43 pm

Re: Display Web page in popup

Post by JamesDuignan » Mon Apr 15, 2019 8:54 am

Hi Art,

I found this out because in Chrome the page in the frame says connection refused and in Firefox you get the following message in the console:
Console.PNG
Console.PNG (3.66 KiB) Viewed 8770 times
Regards,
James

Post Reply