Downloads in a webview

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
soapagent
Posts: 93
Joined: Mon Jul 16, 2012 6:19 pm

Downloads in a webview

Post by soapagent »

On an iPad if I have a downloadable link in a webpage containing a csv file In the safari browser touching this link show it up in a viewer which displays (briefly) an 'Open in' button which allows me to open the file in Excel. When a similar link is displayed in a webview the viewer appears to come up but no 'Open in' option is displayed. Is it possible to get this behavior to work.
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: Downloads in a webview

Post by tsupartono »

I don't think there is a way to get the "Open In..." button with imbedded web view.

If you have control over the HTML source, the best you can do is to open that CSV in Safari by invoking the OpenURL operation (once open in Safari you can use the "Open In..." functionality).
Let me know if you need more details with OpenURL operation.
soapagent
Posts: 93
Joined: Mon Jul 16, 2012 6:19 pm

Re: Downloads in a webview

Post by soapagent »

Hi,

I am currently building the csv on the fly and embedding it as a href within a webview containing a <table> of the same data. If I add a button to my form and on click perform a set_openurl on the csv url this will open the file up in Safari. Is this correct? If so it may be exactly what I need. I'll give it a go later this morning.
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: Downloads in a webview

Post by tsupartono »

Yes that's correct.
soapagent
Posts: 93
Joined: Mon Jul 16, 2012 6:19 pm

Re: Downloads in a webview

Post by soapagent »

Works beautifully! Thanks!
Post Reply