Jump to content

Copy link to clipboard on click... possible?


5kyy8lu3

Recommended Posts

I'm writing a photo hosting web application, kinda like photobucket, and I'd like an easy way for users to get the picture url saved to their clipboard.  Is it possible to make a button that does this?  Or would that require javascript?

 

Thanks ahead of time.

 

UPDATE: well i'm still googling my butt off, and I'm reading that javascript does it but firefox doesn't allow access to the clipboard, so flash is the only othe way (i think), so i guess i'll just have to make a form box with the value set to the url for the user to copy?  and if that's my only option, is there a way to make the text already highlighted when the page loads? thanks.

Link to comment
Share on other sites

what you are asking about provides a HUGE security risk with doing something like that. Any time you are implementing code that communicates action with a users personal machine such as copying to the clipboard, there are always security bugs involved. I wouldn't worry about this and allow the user to just copy and pastes and they please!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.