W
workitharder
Is there any way whatsoever to manipulate the MIME content-type at the
server-side? My goal is to redisplay a (very large) html table with
the "Content-Type:application/vnd.ms-excel" http header. This is to
avoid the need to re-download the data which is already there.
This is my best try and it doesnt work:
server-side? My goal is to redisplay a (very large) html table with
the "Content-Type:application/vnd.ms-excel" http header. This is to
avoid the need to re-download the data which is already there.
This is my best try and it doesnt work:
Code:
<html><body>
<script language=javascript>
var myTable="<TABLE> <TR> <TD>1</TD> <TD>2</TD> </TR> <TR><TD>3</TD>
<TD>4</TD></TR> </TABLE>"
document.writeln("Hello World!");
document.writeln(myTable);
function f()
{
var
w=window.open('','','toolbar=no,scrollbars=no,width=200,height=150')
w.document.open('application/vnd.ms-excel','replace');
w.document.writeln(myTable);
w.document.close();
}
</script>
<A href="" onClick="document.write('reloading...');">reload</A>
<A href="" onClick="f();return false;">xls</A>
</body></html>