I have run into similar issues and believe it’s a restriction on the browser side.
The workaround is to have the button call executeInXojo and capture it in the JavascriptRequest event. Display your open dialog and get a filename to open. Then write a separate javascript in your page that loads in that filename via ExecuteJavascript.
Thank you Christian and Rick.
Unfortunately <input type="file" accept=".xls,.xlsx,.txt,.csv"/> makes no difference.
I’m not sure I fully understand Christians advise but I’ll see what I can make out of it.
This is exactly what I want to achieve!
I want to choose the file in XOJO and play/show it in the HTMLViewer using wavesurfer.js.
Actually I don’t want the user to pick the file – this was only for testing.
I’ve added the runOpenPanelWithParameters event with this code:
Var URLs() As NSURLMBS
MediaFile = FolderItem.ShowOpenFileDialog("")
If MediaFile <> NIL And MediaFile.Exists Then
Var TheURL As New NSURLMBS(MediaFile)
URLs.Add(TheURL)
Else
URLs = NIL
End if
Me.runOpenPanelWithParametersCompleted(URLs)
– and it works as expected.
But I’m uncertain if I do it the proper way cause the code is mainly based on trial and error