Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Need a bit of javascript (or something)

Thread Tools
 
Search this Thread
 
Old 31 March 2004, 10:33 AM
  #1  
markr1963
Scooby Regular
Thread Starter
 
markr1963's Avatar
 
Join Date: Jun 2002
Location: Perth, Western Australia
Posts: 1,866
Likes: 0
Received 0 Likes on 0 Posts
Question 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
Old 31 March 2004, 12:40 PM
  #2  
judgejules
Scooby Regular
 
judgejules's Avatar
 
Join Date: Nov 2000
Posts: 1,227
Likes: 0
Received 0 Likes on 0 Posts
Default

AFIK this isnt possible as it would be a security risk.

Not 100% sure thought.

J
Old 31 March 2004, 12:55 PM
  #3  
GaryK
Scooby Regular
 
GaryK's Avatar
 
Join Date: Sep 1999
Location: Bedfordshire
Posts: 4,037
Likes: 0
Received 0 Likes on 0 Posts
Default

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
Old 31 March 2004, 03:55 PM
  #4  
markr1963
Scooby Regular
Thread Starter
 
markr1963's Avatar
 
Join Date: Jun 2002
Location: Perth, Western Australia
Posts: 1,866
Likes: 0
Received 0 Likes on 0 Posts
Default

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

Last edited by markr1963; 31 March 2004 at 04:00 PM.
Old 31 March 2004, 04:09 PM
  #5  
Iain Young
Scooby Regular
 
Iain Young's Avatar
 
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by markr1963
Kind of thing I'm looking for is the right click option 'e-mail to' as for images
Unfortunately, that is a function provided by the web browser rather than anything you can access from javascript etc. As mentioned before, you cannot do this because of the security implications...

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
Old 31 March 2004, 04:55 PM
  #6  
Avi
Scooby Regular
 
Avi's Avatar
 
Join Date: Apr 2001
Location: Manchester
Posts: 5,084
Likes: 0
Received 0 Likes on 0 Posts
Default

Use adobe reader 6, click on the email icon at the top.

It asks if you want to email a copy of the pdf and opens up a new message in outlook.
Old 31 March 2004, 05:41 PM
  #7  
Avi
Scooby Regular
 
Avi's Avatar
 
Join Date: Apr 2001
Location: Manchester
Posts: 5,084
Likes: 0
Received 0 Likes on 0 Posts
Default





It then opens a new message in outlook, with the pdf attached for you.

Last edited by Avi; 31 March 2004 at 05:44 PM.
Old 01 April 2004, 07:44 AM
  #8  
markr1963
Scooby Regular
Thread Starter
 
markr1963's Avatar
 
Join Date: Jun 2002
Location: Perth, Western Australia
Posts: 1,866
Likes: 0
Received 0 Likes on 0 Posts
Default

That's the badger

Cheers Avi
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
JimBowen
ICE
5
02 July 2023 01:54 PM
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
Frizzle-Dee
Essex Subaru Owners Club
13
01 December 2015 09:37 AM
slimwiltaz
General Technical
20
09 October 2015 07:40 PM
Benrowe727
ScoobyNet General
7
28 September 2015 07:05 AM



Quick Reply: Need a bit of javascript (or something)



All times are GMT +1. The time now is 06:31 AM.