Forum

Client-Side Development

JavaScript

Is there a way to simulate CTRL-A / CTRL-C in javascript? Results 1 to 15 of 19 Thread: Is there a way to simulate CTRL-A / CTRL-C in javascript? Tweet #1 Join Date May 2003 Location Milwaukee Posts 348 Is there a way to simulate CTRL-A / CTRL-C in javascript? Just curious. I've seen how to copy stuff to the clipboard from a textarea, but what if I want to copy the whole page?



Thanks in advance. #2 Join Date Mar 2005 Location Sydney, Australia Posts 7,974 The clipboard isn't part of the web browser so Javascript doesn't have access to it (except in Internet Explorer). <Person> #3 Join Date May 2003 Location Milwaukee Posts 348 Well, we're an IE only shop...so that's okay. #4 Join Date May 2003 Location Milwaukee Posts 348 bump #5 Join Date Aug 2004 Location Edinburgh Posts 244 Originally posted by <Person>

we're an IE only shop...so that's okay.



as far as simulating the keystrokes, I don't know that it is possible anyway in any browser. #6 Join Date May 2003 Location Milwaukee Posts 348 It's not for a website...they're reports that are precompiled HTML pages. I want the user to be able to click a button/link that will copy the contents a table to clipboard so that it can be pasted into Excel/e-mail, etc. #7 Join Date Mar 2005 Posts 121 If it were for an internal site (LAN) developed and used as a tool, and not an external (WAN) public-access site, I don't see why there would be anything wrong allowing that kind of access to the clipboard. Am I missing something? It's totally possible cuz I'm still a noob at this too. #8 Join Date May 2003 Location Milwaukee Posts 348 The reports are internal only and are hosted on our intranet. #9 Join Date Aug 2004 Location Edinburgh Posts 244 Originally posted by <Person>