Avatar of freshjuice
freshjuiceFlag for United States of America asked on

What is the easiest way to add a "forward article to friend" and "print" link to webpages?

The question title says it all. What I'm looking for is a little cut-and-paste code that makes this easy to do.

For an example of the webpages that I'd be adding it to, see:

I'm using Dreamweaver CS2
Adobe DreamweaverHTMLJavaScript

Avatar of undefined
Last Comment

8/22/2022 - Mon
Jason C. Levine

Hi freshjuice,

Easy one first:  there are a number of "Print This" extensions available for Dreamweaver, but it's a simple bit of javascript code:

<a href="javascript:window.print()">Click to Print This Page</a>

Forward to friend is slightly harder depending on how you want to do it.  If the intent is to just send the URL to a friend, you can do it via a mailto: link alone.

If you want to actually send the page in question, you have to get a server-side script language involved.

ON the forward, I really would like to forward the article, if possible. There's no simple third-party app that will do this for me?
Jason C. Levine

Depends on your definition of simple.  

The way those things usually work is that a server side script reads or attaches the specified file and mails it through a mail() function and they are not hard to write if you done any kind of basic web programming.  Which server-side language do you have access to?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy

Heh, this is why it said "Beginner" on this topic. I'm not even sure what you mean by "server-side"

I know my site can run PHP and Java, if that answers your question.
Jason C. Levine

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

OK. I'm going to accept this as a solution, so as not to bog you down in asking more questions.

However, I'm thinking that for my purposes right now, just adding a "send this page as a link" will have to do. How should that be formatted so that it has a clever subject line and then the link?
Jason C. Levine

I'll dump some code for that much later tonight...I'm busy with paying work today.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

Thanks, I appreciate it.