Discount Perfume - Debt Consolidation - Kamala Harris - Wordpress Themes - WoW Gold

PDA

View Full Version : Do You Know How to do this . . . ?


Masterful
Apr 16th 2009, 5:37 pm
Does anyone know how to create a link which, when clicked, copies the anchor text to the user's clipboard and opens the destination in a new window?

For example, picture this link:

<a href="webform.com">ID: 12345</a>

It will look like this on the page:

ID: 12345

When someone clicks the link, ID: 12345 must be copied to the user's clipboard and webform.com must be opened in a new window.

Anyone know how to do this?

koko5
Apr 17th 2009, 2:31 am
Hi,

I guess you'll find this link (http://www.htmlgoodies.com/beyond/javascript/article.php/3458851) useful.

pp: Myabe it's better to store value in cookie instead of copy to clipboard
Regards.

Masterful
Apr 17th 2009, 3:19 am
Thanks, Koko5, but that only works with IE. Plus, it doesn't copy the anchor text.

JavaScriptBank.com
Apr 17th 2009, 6:14 am
Copy to Clipboard using Flash (http://www.javascriptbank.com/javascript/form/copy-to-clipboard-using-flash/detail/)

customize this JavaScript (http://www.javascriptbank.com) for your need, work on all browsers

Masterful
Apr 17th 2009, 12:10 pm
Thanks, guys, but those won't work. The text to be copied must be the anchor text of the link, and when the link is clicked, the destination must be opened in a new window. For an example, click here (http://www.couponcabin.com) and refer to the coupon code links.

Even so, thanks for trying. One rep point for each of you. :)

Can anyone else help?

Masterful
Apr 19th 2009, 4:26 am
Does anybody know how to do this? I have asked in two other forums and nobody has responded.

Is it very difficult or something?