<script type="text/javascript" src="jquery.js"></script>
<script>
function getImageDownload() {
debugger;
var filename ="download";
var contentType = "pdf"
var v = [];
v.push($('#gstNoProofBlob').val());
v[0] = v[0].replace(/\@/gi, '+');
//alert(v[0]);
var link = document.createElement("a");
var dName=filename+"."+contentType;
link.download = (dName);
link.href = "data:image/pdf;base64," + v[0];
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
delete link;
}
</script>
<textarea rows="10" cols="50" id="gstNoProofBlob" name="gstNoProofBlob"> </textarea><br/><br/> <input type="button" value="Download File" onclick="getImageDownload()" />
<script>
function getImageDownload() {
debugger;
var filename ="download";
var contentType = "pdf"
var v = [];
v.push($('#gstNoProofBlob').val());
v[0] = v[0].replace(/\@/gi, '+');
//alert(v[0]);
var link = document.createElement("a");
var dName=filename+"."+contentType;
link.download = (dName);
link.href = "data:image/pdf;base64," + v[0];
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
delete link;
}
</script>
<textarea rows="10" cols="50" id="gstNoProofBlob" name="gstNoProofBlob"> </textarea><br/><br/> <input type="button" value="Download File" onclick="getImageDownload()" />
No comments:
Post a Comment