You could add a download='filename'
attribute to your embedded pdf link...
<object data="myURL" type="application/pdf" download="FileName" width="300" height="200"></object>
in jQuery you could change the attribute on dom ready, with your required filename.. eg.
$(document).ready(function(){
$('object[data=myURL]').attr('download', 'newFilename.pdf');
});
source of the answer
I have been working on this for a while and would love some help. I have two sets of divs of different lengths offset by varying distances which are being created from an array. Fiddle 1: JSFiddle1 ...
I have been working on this for a while and would love some help. I have two sets of divs of different lengths offset by varying distances which are being created from an array. Fiddle 1: JSFiddle1 ...
as you can see here jsfiddle.net/TTU4Z/1/ The jquery code in question is below and if i run it without all my code (like in jsfiddle) it run perfectly. but with all my code doesn't run. $(document)....
as you can see here jsfiddle.net/TTU4Z/1/ The jquery code in question is below and if i run it without all my code (like in jsfiddle) it run perfectly. but with all my code doesn't run. $(document)....
I want to call my function in php from java script or jquery. I have tried this. <script> function hello(){ <?php print_hello(); ?> } hello()...
I want to call my function in php from java script or jquery. I have tried this. <script> function hello(){ <?php print_hello(); ?> } hello()...
My Code is: $rootScope.getResource = function(id) { $http.get( "path/of/resource/" + id ) .success(function (data, status, header, config) { return data; }) .error(function (data, ...
My Code is: $rootScope.getResource = function(id) { $http.get( "path/of/resource/" + id ) .success(function (data, status, header, config) { return data; }) .error(function (data, ...