I am trying to use jquery fileDownload but it's showing 'offsetParent is not set -- cannot scroll' error in firebug.
Here is my code. It's simple.
$.fileDownload("/TmpFiles/Test.pdf")
.done(function () { alert('File download a success!'); })
.fail(function () { alert('File download failed!'); });
Can anyone help me to fix the issue?
I am trying to use jquery fileDownload but it's showing 'offsetParent is not set -- cannot scroll' error in firebug.
Here is my code. It's simple.
$.fileDownload("/TmpFiles/Test.pdf")
.done(function () { alert('File download a success!'); })
.fail(function () { alert('File download failed!'); });
Can anyone help me to fix the issue?
Share Improve this question asked Jul 9, 2014 at 10:26 Soe Moe ThuSoe Moe Thu 591 silver badge6 bronze badges 2- That error must be ing from other script check the line number of errror and find post the respective code too. this seems to be correct. – Jai Commented Jul 9, 2014 at 10:34
- Jai, the problem is it doesn't even show which line/which file. In firebug it juz show that 'offsetParent is not set -- cannot scroll' – Soe Moe Thu Commented Jul 9, 2014 at 10:46
1 Answer
Reset to default 6I had the same issue. The inline PDF viewer causing this error, so what I did is to force the apache to download the PDF file. So far I figured out this solution with .htaccess file:
<FilesMatch "\.(pdf)$">
<ifModule mod_headers.c>
Header set Content-disposition "attachment"
</ifModule>
</FilesMatch>
In your example, you need to place the .htaccess file in the /TmpFiles/ directory to apply the rule to the *.pdf files.