• Resolved Oxygen89

    (@oxygen89)


    Hi all,

    My requirement is very simple. Whenever i click on a link (PDF), it should display a dialog box and ask me whether you want to open a file or save file.

    Right now, whenever i click on any link, it is by default downloading. I just need to know, what should be done in this.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Could try this link. Demo works for me.

    Thread Starter Oxygen89

    (@oxygen89)

    @rdellconsulting: I read that article, and tried the download attribute (Which is only for the file name)in the anchor tag, but, still, it is by default downloading. No dialog box appears asking me to save/open a file.

    Thanks

    Are you running PC or Mac? I’m on Win81 and not aware of anything I have to do, except Set Associations. Never seen that download attribute before, and did see it was filename related.

    Maybe someone else will chip in.

    Thread Starter Oxygen89

    (@oxygen89)

    I’m running PC. Yeah, it is for filename only.

    Thread Starter Oxygen89

    (@oxygen89)

    I researched for this. I found that we need to edit the .htaccess file using this link .

    Right now my .htaccess file looks like this:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Is it a good practice to edit this file, if yes, then, where should i add code.

    Thanks

    Thread Starter Oxygen89

    (@oxygen89)

    Any solution for this.

    Thanks

    .htaccess is a very important file. There are times when you have to edit it. If you make any mistakes, it will likely lead to problems such as ‘White Screen of Death’ or other unwanted problems. So before you do anything, take a copy (eg .htaccess.sav) so you can get back to a working copy.

    The code in that link is not WordPress specific, so simply add the code at the end of the existing code.

    Let us know if that works.

    Thread Starter Oxygen89

    (@oxygen89)

    Okay. Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Open dialog box after clicking on download link’ is closed to new replies.