Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

download default behavior and image files

4 views
Skip to first unread message

Christoph Kreß

unread,
Nov 9, 2005, 6:48:38 PM11/9/05
to
I can't get the download default behavior to download an image and present a
file selection box. The code is straightforward and I can't see any problem.

It seems like the download happens, because the callback function gives me
the correct file type, but the user does not get a "file save as" ui
presented.
Downloading textual data works fine, but for this kind of data there is no
save as dialog involved by default.

Any help greatly appreciated!

Christoph Kreß

My code:
<html xmlns:ie>
<head>
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="Tue, 11 Oct 2005 12:00:00 GMT"
/>

<style type="text/css">
ie:download { display: none; }
</style>

<script type="text/jscript">
function window::onload()
{
document.all.oDownload.addBehavior("#default#download");
}

function button_onclick()
{
alert("Before download - " + document.all.oDownload.id);
document.all.oDownload.startDownload("_graphics/download.avi",
onDownloadDone);
}

function onDownloadDone(s)
{
alert("After download - " + document.all.oDownload.id);
window.alert(s);
}
</script>
</head>
<body>
<ie:download id="oDownload" />
<button onclick="button_onclick();">Download File</button>
</body>
</html>


0 new messages