Page 2 of 4

Re: Download to CSV

Posted: Fri Dec 13, 2019 5:20 am
by kev1n
Replace DownloadCSV with BrowseDownloadToCSV

Code: Select all

if(nuFormType() == 'browse'){
    nuAddActionButton('nuRunPHPHidden', 'Download to CSV', 'nuSetProperty("browse_sql",nuCurrentProperties().browse_sql); nuRunPHP("BrowseDownloadToCSV")');
}

Re: Download to CSV

Posted: Fri Dec 13, 2019 8:40 am
by mariri
I've already done that and I have a CSV file with my data in output. But in this document I also have an HTML code, I don't know why :cry:

Re: Download to CSV

Posted: Fri Dec 13, 2019 9:02 am
by kev1n
Replace

Code: Select all

if (strpos(fileName, '#') === false) {
with

Code: Select all

if (strpos($fileName, '#') === false) {

Re: Download to CSV

Posted: Fri Dec 13, 2019 9:36 am
by mariri
Great it works now ! Stupid mistake that I did somehow :mrgreen:

Thanks !

Re: Download to CSV

Posted: Tue Aug 25, 2020 12:34 pm
by ricklincs
I have tried ke1vin example and I get

/nurunphp.php?i=5f44e33c6aea3ad in my browser with no download of a csv file when I click the Download to CSV button on my browse screen

Is this something that has changed with Browser security?

Thank you

Re: Download to CSV

Posted: Tue Aug 25, 2020 1:52 pm
by kev1n
Hi,

A popup-blocker might be preventing the download.
For me, the download works in Chrome, Firefox, Edge (The latter two show a popup message)

Re: Download to CSV

Posted: Tue Aug 25, 2020 3:53 pm
by ricklincs
Hi ke1vin,

Doesn't look like its a popup-blocker, have tried it on an older pc and after allowing popups it opens a blank window with www......./nurunphp.php?i=5f4516222d74de3
I have tried on Chrome, Firefox, Edge, Opera and still the same result. When clicking the print button a new window appears with all the correct info with www...../nurunhtml.php?i=5f4517446b2e30c.

Thanks

Re: Download to CSV

Posted: Tue Aug 25, 2020 4:33 pm
by kev1n
Is Run set to "Hidden" in the Procedure?

Re: Download to CSV

Posted: Tue Aug 25, 2020 4:38 pm
by ricklincs
Hi Ke1vin

Yes Run is set to Hidden in the Procedure.

Re: Download to CSV

Posted: Tue Aug 25, 2020 5:11 pm
by kev1n
So I tried on three different computers (windows) with different browsers. It always works for me.

Try if "Download to CSV" works in my sample db:
http://nubuilder.epizy.com/index.php?f= ... est&p=test