473,508 Members | 2,295 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Grab current URL and put to clipboard.

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
2 3840
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
11447
by: LG | last post by:
Just have a question with regards to the clipboard, and how to read what other applications (Adobe InDesignCS) place in the clipboard. I am currently in the process of creating a booklet from a...
5
1295
by: Steven C | last post by:
Hello: I have a datagrid that has a dataset bound to it. When the customer selects a certain row in the grid, I would like to be able to grab the PK for that row, so I can call the customer...
0
3221
by: P N | last post by:
Hi all, I have question about copying picture from MS-Word into the Clipboard and then copy from the Clipboard into the bitmap variable within C#. The original image size is 2288 x 1712. If I...
4
6573
by: Joshua Campbell | last post by:
I am working on an application that needs to parse out data that has been copied into the clipboard. My first questions are how can I detect if the clipboard is empty, and how can I empty the...
16
1914
by: ad | last post by:
Hi, How can we get the content of clipboard with program?
24
2959
by: Randall Arnold | last post by:
I know how to use MSHTML to grab the innerhtml from an html web page, but what if I want to look at elements of a rendered aspx page? Is there any way to do this using the MSHTML DOM object? ...
3
3708
by: SAL | last post by:
I have the following VB.net Class/Function that I call from an ASP.net page: Public Class MyTestClass Public Function embedHyperlink(ByVal fileID As Integer, ByVal fileName As String) As String...
1
4178
by: Ludwig Wittgenstein | last post by:
Hi, all. Here's the scenario: I embedd a .txt file in Word as OLE object, then I copy it (manually), so now it's on the clipboard. How do I programatically (in C#) get that OLE object file from...
8
2455
by: active | last post by:
Guess I'm looking for someone who likes to work difficult puzzles. I can't seem to ever retrieve a palette handle from the clipboard. Below is a simple test program that demonstrates the...
0
7228
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7128
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7332
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7058
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4715
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.