/    Sign up×
Community /Pin to ProfileBookmark

Right Click Save Link AS (PDF) only available as html

Hope somebody can help…

I have a page of links that bring up PDF’s into a new window. But if the user wants to right click and “save link as” the only option available to them is as html which then just refreshes the link.

Can somebody take a look at this page and possibly tell me why this is happening?

Thanks.

Kickdrum

[url]http://dallasdatasystems.com/clientstaging/phoenixville/Forms.html[/url]

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@yamaharussFeb 14.2008 — You can't save an html link as a pdf doc. You are calling your PDFs through Javascript. Your "targets" are

http://dallasdatasystems.com/clientstaging/phoenixville/Forms.html#

Saving that TARGET is saving a web page.

Change

<a href="#" onclick="MM_openBrWindow('PDF/CodesAndZoning/ResInstallationOfAFence.pdf','','toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600')">

to

<a href="PDF/CodesAndZoning/ResInstallationOfAFence.pdf" onclick="MM_openBrWindow('PDF/CodesAndZoning/ResInstallationOfAFence.pdf','','toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600')">
Copy linkTweet thisAlerts:
@tobiaseichnerFeb 14.2008 — Hello :-)

This happens because you use JavaScript to open the pop-up windows for viewing the PDFs. So when users are clicking at "Save link as...", they intentionally not save the PDF, but the link opening the pop-up window (which then call the PDF as its content).

A solution is simple: Get rid off the pop-ups (they may generate problems anyway with some pop-up blockers).

Instead of, you may use "target=_blank" in the a href tag calling the PDFs. This will lead opening the PDFs in a new window. So you keep a similar functionality, but without the hassles.

For example: <a href="http://www.me.tld/me.pdf" target=_blank>Click here</a>

You find a working example at one of our websites, visit http://www.sunnyscript.com/PerlCGI/YourAffiliates/index.htm and click at "Download online documentation".

Hope that helps.

Tobias.


__________________
Business consulting services: http://www.starenterprise.com

CGI Perl scripts and software development: http://www.sunnyscript.com
Copy linkTweet thisAlerts:
@kickdrumauthorFeb 14.2008 — Thank you both so much for the insight, it is greatly appreciated.

Leo
×

Success!

Help @kickdrum spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...