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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Onclick button which saves contents of the clipboard to a specific folder.

    Hi all, I have been searching for quite a while for a solution to this but I have no no luck.

    This is what I have currently

    Code:
    <html>
    <script>
    
    function doSaveAs(){
    	if (document.execCommand){
    		document.execCommand("SaveAs")
    	}
    	else {
    		alert("Save-feature available only in Internet Exlorer 5.x.")
    	}
    }
    </script>
    <form>
    <button onClick="window.location='http://192.168.0.105/now.jpg'"> Snapshot</button>
    </form>
    <br>
    </html>
    When the button is clicked it saves a jpg image off a camera and opens a save as dialog box.

    Is it possible to do this but saving the contents of the clipboard?

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,603
    Thanks
    0
    Thanked 645 Times in 635 Posts
    What browser are you trying to run that in? Code like that will only run in old versions of Internet Explorer (or newer versions of Internet Explorer if you turn off some of the security settings).
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Tags for this Thread

    Posting Permissions

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