473,796 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting the clipboard content from Notepad to the html page

1 New Member
Hi
How can I get the clipboard content from Notepad to my page ?(For pasting I use the dhtml method document.execCo mmand('Paste', true, null) and it works fine - but I need the clipboard content without calling "Paste" option).
Thanks,
Zana
Oct 5 '05 #1
3 2273
acoder
16,027 Recognized Expert Moderator MVP
If it works (though probably only in IE), not sure why you'd want an alternative.
Apr 5 '08 #2
rnd me
427 Recognized Expert Contributor
the firefox version is a lot longer, and requires a user-change to about.config, let me know if you want it.


Expand|Select|Wrap|Line Numbers
  1.  
  2. function CB() //sets or read clipboard in IE accepts 1 arg to set, returns cb when no argument is passed
  3. {
  4. if (arguments.length)     {window.clipboardData.setData('Text', arguments[0])}
  5. else     { return window.clipboardData.getData('Text')}
  6.  }//end CB
  7.  
  8.  
Apr 6 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
True, Firefox does have that option and that's the way it should be - up to the user if they want to allow JavaScript access to the clipboard. You could always inform your users how to enable it and then the choice is theirs.
Apr 7 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
7675
by: Wayne Wengert | last post by:
I have an ASP page in which I want to copy the contents of a variable (text) to the clipboard. Based on MSDN examples I tried window.clipboardData.setData(strTemp) and that generates an error that "window" is not declared How do I get my ASP page to copy the data to a clupboard? Wayne
5
2689
by: TC | last post by:
Hello, I am familiar with obtaining source file reference material from the system clipboard using the old Win32 API. For example, copy an Excel chart onto the clipboard and goto Word. Under, Edit & PasteSpecial, there is a label called "Source:" which will contain the file path, etc. How can one obtain the source file reference material utilizing .Net
5
4079
by: TC | last post by:
Hello, Here is what I'm trying to do: -- Make sure both MS Excel and MS Word are running -- Create an Excel chart -- Save the Excel file -- Copy the Excel chart onto the clipboard using Ctrl + C -- Go to Word and look under Edit > Paste Special -- Note there is a source reference and an option to paste the chart as a
5
1542
by: J | last post by:
Hi All, I have a quick question, I am making a little script that shows users how easy it is to have there clipboards read. I would like to capture my users clipboard (plain text only) and then AUTOMATICALLY send them to a page displaying there contents, I want to get the +content+ put into a $content vairiable for easier manipulation in PHP. As javascript is client side and PHP serverside, i need to submit the form
16
1939
by: ad | last post by:
Hi, How can we get the content of clipboard with program?
1
18674
by: Figmo | last post by:
Wow.....this is darned odd.... I have an app that integrates with other applications. It registers a global hotkey with Windows. When the hotkey executes it sends a CTRL-C to the active window (any application) to copy whatever text is selected to the clipboard. It then issues a C# Clipboard.GetText(...) and does some processing with this string. All is good, no errors thus far.
2
14299
by: toronto | last post by:
Seasons Greetings Everyone! I want to use JavaScript's event object to detect whether someone has pressed the 'PrintScreen' key to screenshot, via the Windows Clipboard, and to print website content I don't want printed... It occurred to me that the easiest way to do this is to erase or replace the contents of the Windows Clipboard... Some code snippets I found at webdeveloper.com forums:
0
1245
by: Keith G Hicks | last post by:
asp.net 2.0 Well until I started looking for how to do this I figured it would be very easy and lots of information out there. Maybe I'm not looking in the right places. I have some code in VB that's creating a list of names and populating a literal control on the page. I'd like to put a button on the page that let's the user copy the contents of the literal to the clipboard. As I write this I'm thinking this probably needs to be...
6
8175
by: Adam Sandler | last post by:
Hello, I have a richtextbox and a method which copies the contents of the richtextbox to the clipboard -- like so: Clipboard.SetText(this.richTextBox1.Text); The problem is if there are any returns, and the user pastes the clipboard contents into notepad, all the data appears on one line -- with a bunch of non printing characters (which show up as boxes) where
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9524
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10168
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9047
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5568
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.