By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,605 Members | 2,153 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,605 IT Pros & Developers. It's quick & easy.

Grab current URL and put to clipboard.

P: n/a
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
Oct 11 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Oct 11 '05 #2

P: n/a
Yogev wrote:
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',windo w.location.href)"
value="mybutton">

Techniques for Mozilla:

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

--
Bart

Oct 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.