View Full Version : Chrome and Javascript

12-31-2009, 10:34 AM
this little thing works in Internet Explorer but not in Chrome.. and i m a Chrome fan... is there a way to make it work in Chrome?

javascript:window.clipboardData.setData("Text", 'here is my text');

i use it to create a full link to an embedded video file in a website, which i can then download via a separate download software, such as Orbit.. i tried to use "'window.location.href", but that would make Chrome download the file itself.. i wanted to use separate download software.. :confused:

12-31-2009, 04:36 PM
You can't have it both ways. If you use a function that is only supported by IE, then you shouldn't be surprised when it doesn't work outside of IE.

12-31-2009, 07:15 PM
thanks for the reply... actually i m not concerned whether that thing works in Internet Explorer, I just want to use Chrome.. lets forget IE..

there must be a similar code for Chrome i guess...

01-03-2010, 07:16 AM
what is the Chrome version of javascript:window.clipboardData.setData("Text", 'here is my text');.........??

rnd me
01-03-2010, 11:19 AM
since chrome is designed to be a safe browser to use, it has no way for javascript to reach a user's private clipboard.

01-04-2010, 06:02 AM
is there any other way this could be done?

this is how i create a download link to the embedded video file: "https://website.com/"+something+something+".flv"

I then need to copy it to the clipboard using the javascript command i used earlier, later pasting it to my favorite download software.

i tried alert box, but i could not copy the text manually from the alert box itself..