Grab current URL and put to clipboard.

Y

Yogev

Hi,
Looking for the solution:
I want to click on my own button on ToolBar of IE6 and to activate
the javascript that put the current URL (from location/address line of IE)
to clipboard.
My first try to do something practical with javascript, like a study case.
Thanks
Yogev
 
R

Randy Webb

Yogev said the following on 10/11/2005 3:43 AM:
Hi,
Looking for the solution:
I want to click on my own button on ToolBar of IE6 and to activate
the javascript that put the current URL (from location/address line of IE)
to clipboard.
My first try to do something practical with javascript, like a study case.

And what have you tried so far?

Everything you need to know to do that is very easily found in the archives.

read window.location.href
copy to clipboard.
 
B

Bart Van der Donck

Yogev said:
I want to click on my own button on ToolBar of IE6
and to activate the javascript that put the current
URL (from location/address line of IE) to clipboard.
My first try to do something practical with
javascript, like a study case.

As long as we're talking about IE only:

<input type="button"
onClick="window.clipboardData.setData('Text',window.location.href)"
value="mybutton">

Techniques for Mozilla:

http://www.xulplanet.com/tutorials/xultu/clipboard.html
http://www.krikkit.net/howto_javascript_copy_clipboard.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,689
Members
48,796
Latest member
Greg L.

Latest Threads

Top