C
Chris
Hi. I'm writing an web app where during the course of events I want to
dynamically create an iframe and set its src property to an Excel
spreadsheet. I know my users will be using IE6 and they will all have
Excel installed, and this process appears to work nicely to show a
simple embedded xls document.
Now comes the part I'm having trouble with... Many times it will be
appropriate to subsequently destroy that xls-containing iframe and
display something else. I believe I'm destroying the iframe correctly,
but the EXCEL.EXE process on the client never goes away. It has no
visual representation after the iframe is removed, so the only recourse
is to kill it from the Windows process list. So, I think I'm probably
doing something wrong.
My question is this: How can I destroy this iframe and truly kill off
excel in the process?
Here's sort of what I'm currently working with:
// to create the iframe
var div = document.getElementById("theIframeParentDiv");
var ifr = document.createElement("iframe");
ifr.id = "iframe1";
ifr.src = "mydoc.xls";
// also set some positioning attributes...
div.appendChild(ifr);
// to destroy the iframe
var ifr = document.getElementById("iframe1");
var div = document.getElementById("theIframeParentDiv");
div.removeChild(ifr);
thanks,
Chris
dynamically create an iframe and set its src property to an Excel
spreadsheet. I know my users will be using IE6 and they will all have
Excel installed, and this process appears to work nicely to show a
simple embedded xls document.
Now comes the part I'm having trouble with... Many times it will be
appropriate to subsequently destroy that xls-containing iframe and
display something else. I believe I'm destroying the iframe correctly,
but the EXCEL.EXE process on the client never goes away. It has no
visual representation after the iframe is removed, so the only recourse
is to kill it from the Windows process list. So, I think I'm probably
doing something wrong.
My question is this: How can I destroy this iframe and truly kill off
excel in the process?
Here's sort of what I'm currently working with:
// to create the iframe
var div = document.getElementById("theIframeParentDiv");
var ifr = document.createElement("iframe");
ifr.id = "iframe1";
ifr.src = "mydoc.xls";
// also set some positioning attributes...
div.appendChild(ifr);
// to destroy the iframe
var ifr = document.getElementById("iframe1");
var div = document.getElementById("theIframeParentDiv");
div.removeChild(ifr);
thanks,
Chris