Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Chrome and Javascript

    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..
    Last edited by apparition; 12-31-2009 at 12:06 PM.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    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.

  • #3
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...

  • #4
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what is the Chrome version of javascript:window.clipboardData.setData("Text", 'here is my text');.........??

  • #5
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,444
    Thanks
    11
    Thanked 598 Times in 578 Posts
    since chrome is designed to be a safe browser to use, it has no way for javascript to reach a user's private clipboard.
    my site (updated 2014/10/20)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.3, IE11:9.2, IE9:2.7, IE10:2.6, FF:16.8, CH:47.5, SF:7.8, NON-MOUSE:37%

  • #6
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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..
    Last edited by apparition; 01-04-2010 at 09:04 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •