How To Copy Url?

How to automatically copy the current URL into a second web-browser or a file

  • Here is what I would like to be able to do: In a web-browser I want to add a button that when I click on it, it copies the current URL address into a file or opens another web-browser and copies it there. I don't know what programming language should be used for this, I am a novice in this area and am looking for pointers on what programming language is appropriate for this and how it can be done. Any web-browser, IE, Chrome, or Firefox is ok to be used for this. If it is not possible to put the buttom in the web-browser, what is any otherway that it can be done?

  • Answer:

    Would something in the bookmarks toolbar be enough? If so, create a shortcut/favorite with URL: javascript:window.open(document.URL);undefined; and put it the bookmarks toolbar. The first part opens a new window with the URL of the current window, the undefined part is so the current window is not replaced (it seemed to be needed for Firefox, otherwise the return value is used to replace the current window's content). Tested to work in Firefox, Chrome and IE, although IE I needed to disable the popup blocker.

TJ1 at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.