No announcement yet.

Form with export to csv button: not able to come back after download of csv file

  • Filter
  • Time
  • Show
Clear All
new posts

  • Form with export to csv button: not able to come back after download of csv file

    Hi all,

    I got a form with a php button where I redir to a blank application that makes the export of master/details rows
    Everything works nice but I got the problem that once downloaded the csv file, sistem ask to open it with excel .. I open it and it's ok.

    What I'm not able to do is that once close excel I need to come back to original form that has made the export.

    I tried to insert sc_exit() at the end of blank application but SC always display an empty page also if the address on the bar is correct to form

    I tried also to insert a sc_redir(form_rfqs,"_parent"); but no way the same
    I tried also to insert sc_make_link(form_rfqs, parm1=[glo_RfqID]); but no way the same

    If you try to refresh it still ask to open the file with excel.... ????
    It seems that SC loose the control at all.

    Is there a way to get it working on expected way ??
    Last edited by giovannino; 01-26-2015, 11:56 AM.

  • #2
    At the moment the only way is to insert the blank application code into the php button code area.


    • #3
      Try to open your blank application with sc_redir (....,'_blank'); It will open another tab and you can go back to the original tab
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development /


      • #4
        Ok Albert , I will try . Thanks.

        Now from within the button php code this is the output on excel.... what is happening ..??? I did a mistake ?
        Why using the blank it worked nice as export ?

        <hr />
        (pdo-mysql): SELECT SUM(Quantity*UnitPrice) FROM rfqs_details
        WHERE RfqID = 4 &nbsp
        <hr />
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

        <html DIR='LTR'>
        <META http-equiv="Content-Type" content="text/html
        <SCRIPT type="text/javascript">
        var sc_pathToTB = '/scriptcase/prod/third/jquery_plugin/thickbox/'
        <SCRIPT type="text/javascript" src="/scriptcase/prod/third/jquery/js/jquery.js"></SCRIPT>
        <SCRIPT type="text/javascript" src="/scriptcase/prod/third/jquery_plugin/malsup-blockui/jquery.blockUI.js"></SCRIPT>
        <SCRIPT type="text/javascript" src="/scriptcase/prod/third/jquery_plugin/thickbox/thickbox-compressed.js"></SCRIPT>
        <link rel="stylesheet" href="/scriptcase/prod/third/jquery_plugin/thickbox/thickbox.css" type="text/css" media="screen" />
        <link rel="stylesheet" type="text/css" href="../_lib/css/Sc7_BlueSky/Sc7_BlueSky_form.css" />
        <link rel="stylesheet" type="text/css" href="../_lib/css/Sc7_BlueSky/Sc7_BlueSky_formLTR.css" />
        <body class="scFormPage">
        <table class="scFormTabela" align="center"><tr><td>

        Obviously I need only the last 4 rows-.... ;-))


        • #5
          OK , tested . It works.
          Now I don't remember how to avoid to see the OK button at the end.


          This is the redir within the button code :


          • #6


            Bang !!! Thanks