a Popup that has content type of excel is disappearing,only when created with getURL actionscript command

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default a Popup that has content type of excel is disappearing,only when created with getURL actionscript command

    Hello,

    I am new to Flash and ActionScript, so please excuse me if this is something
    simple. I am a coldFusion developer using some of the new technology with mx 7.
    Currently, I am using the coldFusion Flash Forms and actionScript for a simple
    popup window displaying data. I am just testing this for for possible future
    development.

    The problem that I am having is this, I have a page in the form that has a
    datagrid on it and I want to be able to export the information on the grid to
    excel. So, I created a button that creates a popup that loads a coldfusion page
    that has the content type set to excel. Below are snippets of the files.

    This is the getURL call that creates the popup.
    <cfoutput>
    <cfsavecontent variable="pop">

    getURL("javascript:window.open('index.cfm?fuseacti on=Popup.excel&report=Popup.De
    tails&OppId=#oppid#', 'USToExcel', 'width=900,height=630, Scrollbars=1,
    resizable=0'); void(0);");
    </cfsavecontent>
    </cfoutput>
    <cfinput type="button" name="toExcel" value="To Excel" onClick="#pop#" >

    This is the file that creates the excel page, minus some of the data.

    <cfsetting enablecfoutputonly="Yes">
    <!--- Set content type. --->

    <cfcontent type="application/excel" reset="yes" >

    <!--- Suggest default name for XLS file. --->
    <!--- "Content-Disposition" in cfheader also ensures
    relatively correct Internet Explorer behavior. --->

    <cfheader name="Content-Disposition" value="filename=Schools.xls">

    <style>
    /* Style Definitions */
    td.MsoNormal{
    mso-style-parent:"";
    border:thin solid #000000;
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman";
    mso-fareast-font-family:"Times New Roman";
    }
    </style>

    <cfoutput>
    <table >
    <tr>
    <th class="MsoNormal">School&nbsp;Name</th>
    <th class="MsoNormal">Parent&nbsp;Name</th>
    <th class="MsoNormal">Enrollment</th>
    </tr>
    </table>
    </cfoutput>

    When I click the button that calls the getURL the new popup window opens for a
    second then disappears. If I comment out the code that sets the excel page's
    content type to excel the page displays the data fine. If I access the excel
    url directly with the content type set to excel the page displays correctly
    asking me to open or save the data. Only when I access the page with the getURL
    is it failing. I tried removing the void(0); from the getURL command and then
    it opens a new page displaying only (object). If I change the getURL to point
    to the url directly instead of opening a new window it works correctly. ie
    "getURL("index.cfm?fuseaction=Popup.excel&report=P opup.Details&OppId=#oppid#");"
    works correctly. The problem is that I need it to be a popup.

    I was hoping someone here would maybe know of a fix to this problem or maybe
    has an idea of a work around. I can be email at [email]ltd_ed@yahoo.com[/email]


    Thank You,
    Mike

    chewba_71 Guest

  2. Similar Questions and Discussions

    1. getURL flash in a Command, doesnt work.
      I am trying to get a flash file displaying in a Command (or a floater, either would be preferable at this point!) and for the most part its working,...
    2. using getURL with cfcontent and Excel files
      I'm not sure if this should be a form question, a cfcontent question or a flash question, so I apologize if this is not the proper place to post. ...
    3. Disappearing type
      I have a PDF file with 450+ pages that I've asembled from several files, but a group of the pages have invisible type. The pages have captions that...
    4. geturl command in flash-html combo site
      Hi, I'm doing a site that has a flash intro. (To make it simpler, the flash intro site is www.website.com) Buttons in the intro should open up...
    5. Content Type = EXCEL in browser
      I'm trying to change content type of an ASPX page in the browser and send some data so the browser mimics an EXCEL spreadsheet (changed the content...
  3. #2

    Default Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command

    Bump
    chewba_71 Guest

  4. #3

    Default Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command

    bump
    chewba_71 Guest

  5. #4

    Default Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command

    bump
    chewba_71 Guest

  6. #5

    Default Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command

    bump
    chewba_71 Guest

  7. #6

    Default Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command

    After doing some more research I have found this is only happening when the
    open/save/cancel alert pops up. I set my browser to always open .xls files and
    it works fine, but if I turn off the always open the popup comes up and then
    the window disappears. I noticed that the default for the open/save/cancel
    popup is cancel. Is it possible that the getURL function appends some type of
    return after opening up a new window, and that is being taken by the browser as
    hitting the cancel?

    Thanks,
    Mike

    chewba_71 Guest

  8. #7

    Default Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command

    bump
    chewba_71 Guest

  9. #8

    Default Re: a Popup that has content type of excel isdisappearing, only when created with getURL actionscript command

    bump. Have a great holiday weekend everyone.
    chewba_71 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139