The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> PrtScrn code in html/javascript ?
dsp
post Mar 23 2007, 08:37 PM
Post #1


Member
***

Group: Members
Posts: 35
Joined: 30-November 06
From: UK
Member No.: 1,173



I want a link on my website behind a button.
When this button is clicked, the current screen / browser window is copied to the clipboard.
Also a <FORM> window open which includes a field for adding an email address.
When an email address is entered the screengrab attachment is emailed to the recipient when submitted.

Is this possible?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Effovex
post Mar 23 2007, 09:18 PM
Post #2


Serious Coder
*****

Group: Members
Posts: 251
Joined: 6-January 07
From: Sherbrooke, Qc, Canada
Member No.: 1,477



It's not possible to take a screenshot of a browser window using javascript. It might be possible with a plugin that the user would have to download and install beforehand but good luck getting anyone to install it.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
dsp
post Mar 23 2007, 09:28 PM
Post #3


Member
***

Group: Members
Posts: 35
Joined: 30-November 06
From: UK
Member No.: 1,173



OK Thanks.

What about the rest ? SO lets say the users manually hits the PrtScrn key. Is it possible to attach that clipboard file and send via email entered into a form?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Effovex
post Mar 23 2007, 09:43 PM
Post #4


Serious Coder
*****

Group: Members
Posts: 251
Joined: 6-January 07
From: Sherbrooke, Qc, Canada
Member No.: 1,477



Mozilla can let you grand access to the clipboard to certain sites. Internet Explorer 5 and 6 let you do that by default. Don't know about IE7. Other browsers probably don't let you do it as it's a huge privacy breach.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Mar 24 2007, 01:01 AM
Post #5


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



What are you trying to accomplish with this? There may be a more practical approach that lets you meet whatever real needs are driving the approach you've asked about.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
dsp
post Mar 24 2007, 07:44 AM
Post #6


Member
***

Group: Members
Posts: 35
Joined: 30-November 06
From: UK
Member No.: 1,173



QUOTE(Darin McGrew @ Mar 24 2007, 06:01 AM) *

What are you trying to accomplish with this? There may be a more practical approach that lets you meet whatever real needs are driving the approach you've asked about.


I have a webpage which allows dragging around of text and images.
I want to allow users to create a unique compositions which can then be saved and emailed to me (via a form etc).
Here's an example of what I have done so far (not my JavaScript). http://share128.tripod.com/dragndrop/

I understand from a link Effovex provided (Thanks) that to save the page as an image, I would need to allow permissions to copy to the clipboard, but it all looks too complex for my abilities so hope there is another option, although as you say, there maybe be another approach.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Effovex
post Mar 24 2007, 07:50 AM
Post #7


Serious Coder
*****

Group: Members
Posts: 251
Joined: 6-January 07
From: Sherbrooke, Qc, Canada
Member No.: 1,477



I don't think the methods I've linked to would allow you to save the image into the clipboard, but it would allow you to get the clipboard data if the user was to use printscreen.

However, what seems like the better method is that when the composition is submitted, it sends to the server the location of each object. Then, knowing what each object is and where it should be placed, you can recreate it.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
dsp
post Mar 24 2007, 08:02 AM
Post #8


Member
***

Group: Members
Posts: 35
Joined: 30-November 06
From: UK
Member No.: 1,173



QUOTE(Effovex @ Mar 24 2007, 12:50 PM) *

I don't think the methods I've linked to would allow you to save the image into the clipboard, but it would allow you to get the clipboard data if the user was to use printscreen.


OK - I must have misunderstood it. Like I say it went over my head.

QUOTE

However, what seems like the better method is that when the composition is submitted, it sends to the server the location of each object. Then, knowing what each object is and where it should be placed, you can recreate it.


Sounds ideal. I don't have any idea how to do this. Can you explain how to implement this or suggest where I get the code from? Thanks for your assistance.

P.S. When you say "it sends to the server the location of each object" do you mean the url location where the images are stored or the position on the page (as this is more important to me)?


This post has been edited by dsp: Mar 24 2007, 08:10 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Effovex
post Mar 24 2007, 08:13 AM
Post #9


Serious Coder
*****

Group: Members
Posts: 251
Joined: 6-January 07
From: Sherbrooke, Qc, Canada
Member No.: 1,477



Well, I don't know exactly what you're doing, or how you're doing it, so it's a bit hard.

But let's imagine you have a square and a triangle that you can move around. When the user is done creating their masterpiece "Triangle over Square", they press a submit button, which submits the x and y coordinate of the triangle and the square. The server just notes the x and y coordinates of those shapes.

Then when you want to recreate the image, you get the information from the server and replace them at the appropriate place on the page. Add complexity as desired.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
dsp
post Mar 24 2007, 08:47 AM
Post #10


Member
***

Group: Members
Posts: 35
Joined: 30-November 06
From: UK
Member No.: 1,173



Yes that would be a solution, but haven't got a clue how to code it.

http://share128.tripod.com/dragndrop/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 02:17 AM