Announcement

Collapse
No announcement yet.

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

Collapse
X
  • 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
    http://127.0.0.1:91/scriptcase/app/B2B_B2C/form_rfqs/

    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, 10:56 AM.

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

    Comment


    • #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
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #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"
        "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

        <html DIR='LTR'>
        <head>
        <META http-equiv="Content-Type" content="text/html
        <SCRIPT type="text/javascript">
        var sc_pathToTB = '/scriptcase/prod/third/jquery_plugin/thickbox/'
        </SCRIPT>
        <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" />
        </head>
        <body class="scFormPage">
        <table class="scFormTabela" align="center"><tr><td>
        4,"ALFKI","AGE01","2014-12-10",
        5,"4","ALFKI","AGE01","1760","2014-11-17","0.0000","0","1.00","N",
        6,"4","ALFKI","AGE01","1760","2014-12-10","0.0000","0","1.00","N",
        7,"4","ALFKI","AGE01","9","2014-12-10","0.0000","0","1.00","Y",


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

        Comment


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

          sc_exit..

          This is the redir within the button code :
          sc_redir(export_csv_singular_rfqs_details,parm1=[glo_RfqID],"_blank");

          Comment


          • #6
            OK....

            sc_exit(sel)

            Bang !!! Thanks

            Comment

            Working...
            X