Fabrice La Active Member Licensed User Longtime User Jul 1, 2014 #1 In my [WebApp] I have Datatable set with: $('#tblfiles').dataTable( { "bFilter": true, "bPaginate": true, "bLengthChange": true, "bSort": true, "bInfo": true, "bAutoWidth": true, "bProcessing": true }); Click to expand... and this Datatable is filed with files list. 1) When I passe the mouse over the Datatable the cussor is "text" and the row does not change aspect but when click I can select the row and return data. How to modify that ? 2) When I click on the row I have the file name. How to dowload it like it was a link ?
In my [WebApp] I have Datatable set with: $('#tblfiles').dataTable( { "bFilter": true, "bPaginate": true, "bLengthChange": true, "bSort": true, "bInfo": true, "bAutoWidth": true, "bProcessing": true }); Click to expand... and this Datatable is filed with files list. 1) When I passe the mouse over the Datatable the cussor is "text" and the row does not change aspect but when click I can select the row and return data. How to modify that ? 2) When I click on the row I have the file name. How to dowload it like it was a link ?
Erel B4X founder Staff member Licensed User Longtime User Jul 1, 2014 #2 Not sure about the first question. About the second question, you should use WebUtils.RedirectTo to start the download. This will probably cause the WebSocket to disconnect (try it). A more complicated solution involves creating an iframe and then downloading the file from the iframe: http://stackoverflow.com/questions/4545311/download-a-file-by-jquery-ajax Upvote 0
Not sure about the first question. About the second question, you should use WebUtils.RedirectTo to start the download. This will probably cause the WebSocket to disconnect (try it). A more complicated solution involves creating an iframe and then downloading the file from the iframe: http://stackoverflow.com/questions/4545311/download-a-file-by-jquery-ajax
Erel B4X founder Staff member Licensed User Longtime User Jul 1, 2014 #3 Actually a better option will be to download the file by opening a new tab. This way the websocket will stay connected. Do something like: Code: Copy ws.Eval("window.open(arguments[0])", Array(<file link>)) Upvote 0
Actually a better option will be to download the file by opening a new tab. This way the websocket will stay connected. Do something like: Code: Copy ws.Eval("window.open(arguments[0])", Array(<file link>))
Fabrice La Active Member Licensed User Longtime User Jul 2, 2014 #4 Thank-you Code: Copy ws.Eval("window.open(arguments[0])", Array(<file link>)) Works Upvote 0