Instigate download from HTMLViewer

In a simple web page, there is a ‘download file’ link.
When displayed inside an HTMViewer, this link seems to be ignored.

If I copy the link and paste it to a ‘real’ browser, it works properly.
Is there a way to make the download happen from HTMLViewer, or is it just a rendering engine?

[quote=232634:@Jeff Tullin]In a simple web page, there is a ‘download file’ link.
When displayed inside an HTMViewer, this link seems to be ignored.

If I copy the link and paste it to a ‘real’ browser, it works properly.
Is there a way to make the download happen from HTMLViewer, or is it just a rendering engine?[/quote]

It would help greatly if you posted the URL…

A url:

http://www.ursasoftware.com/test.html

the contents of that:

[code]

Click here to download a file zip file [/code]

[quote=232639:@Jeff Tullin]A url:

http://www.ursasoftware.com/test.html

the contents of that:

[code]

Click here to download a file zip file [/code][/quote]

Use CancelLoad to intercept such
links. You can safely look for the extension.zip and then assume it is a download.

Return True and then you got two ways :

  • Use an HTTPSecureSocket to get the file
  • ShowURL so the default browser will carry out the download.

Mac? Win? Linux?

For Mac we do have a WebDownloadDelegateMBS class which enables to do downloads in a HTMLViewer in Xojo.