Need a bit of javascript (or something)
#1
Scooby Regular
Thread Starter
Join Date: Jun 2002
Location: Perth, Western Australia
Posts: 1,866
Likes: 0
Received 0 Likes
on
0 Posts
Need a bit of javascript (or something)
We've got a web page that opens a PDF in the browser when a link is clicked. We'd like to have a link or a button (or...) that when clicked opens the user's email client and adds the PDF as an attachment.
Can anyone point me in the right direction?
TIA
Mark
Can anyone point me in the right direction?
TIA
Mark
#3
Scooby Regular
Join Date: Sep 1999
Location: Bedfordshire
Posts: 4,037
Likes: 0
Received 0 Likes
on
0 Posts
yep agreed,
You cant do it client side because basically the mailto clause doesnt support attachments (although you can specify subject and body) and sever side you could do it using cgi/php or whatever but chances are alot of hosts wont let you because of the security issue. I take it the PDF is a form the surfer fills out which gets sent back, why not just do it an a HTML form to capture the information and send it using FORMMAIL?
Gary
You cant do it client side because basically the mailto clause doesnt support attachments (although you can specify subject and body) and sever side you could do it using cgi/php or whatever but chances are alot of hosts wont let you because of the security issue. I take it the PDF is a form the surfer fills out which gets sent back, why not just do it an a HTML form to capture the information and send it using FORMMAIL?
Gary
#4
Scooby Regular
Thread Starter
Join Date: Jun 2002
Location: Perth, Western Australia
Posts: 1,866
Likes: 0
Received 0 Likes
on
0 Posts
Thanks guys
It's nothing so complicated as filling in a form. We have to submit certain documents to clients and in general we use PDF. From our end the ops guys need to be able to view these documents but not be able to alter them. PDF again made sense so they're viewable over the intranet. I've had a couple of users asking if it's possible to attach the PDF they are viewing to an email. If it can't be done we'll find another way
Kind of thing I'm looking for is the right click option 'e-mail to' as for images
Mark
It's nothing so complicated as filling in a form. We have to submit certain documents to clients and in general we use PDF. From our end the ops guys need to be able to view these documents but not be able to alter them. PDF again made sense so they're viewable over the intranet. I've had a couple of users asking if it's possible to attach the PDF they are viewing to an email. If it can't be done we'll find another way
Kind of thing I'm looking for is the right click option 'e-mail to' as for images
Mark
Last edited by markr1963; 31 March 2004 at 04:00 PM.
#5
Scooby Regular
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes
on
0 Posts
Originally Posted by markr1963
Kind of thing I'm looking for is the right click option 'e-mail to' as for images
Why not set up some sort of shopping basket system where you can select (using checkboxes for example) which files you wish to attach, create a form with input fields for email address and message, (similar to the bbs post editor for example) and a submit button.
All this would be submitted to a cgi prog (like formmail), which would construct and send the email to the specified address, with the selected files attached.
Just a thought...
Iain
Trending Topics
Thread
Thread Starter
Forum
Replies
Last Post