Does anyone know how can I hook up my own button to the downloadify lib
Instead of using
<div id="downloadify"></div>
I want to have this assigned to some other button or element. So I can avoid using the custom button it has.
The the demo in the lib page is this one:
<script type="text/javascript">
Downloadify.create('downloadify',{
filename: function(){
return document.getElementById('filename').value;
},
data: function(){
return document.getElementById('data').value;
},
onComplete: function(){
alert('Your File Has Been Saved!');
},
onCancel: function(){
alert('You have cancelled the saving of this file.');
},
onError: function(){
alert('You must put something in the File Contents or there will be nothing to save!');
},
transparent: false,
swf: 'media/downloadify.swf',
downloadImage: 'images/download.png',
width: 100,
height: 30,
transparent: true,
append: false
});
</script>
And can be found here:
http://pixelgraphics.us/downloadify/test.html
Thanks in advance
You could just specify any id.