Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.clipboardData.getData("text") is undefined

Status
Not open for further replies.

krazycoder

Programmer
Jul 4, 2010
5
US
Hi,

window.clipboardData.getData("text") is giving undefined on remote server(unix).
When deployed locally(windows xp) it is coming giving correct value. In both cases the brower is IE running on windows xp. Is there anything wrong in the way I am reading the clipboard data?
Reply With Quote
 
>...is giving undefined on remote server(unix).
[1] In what sense "remote" comes into the picture? The method is always "local" to the user agent.
[2] And then, it is not in the documentation that it is supported in ie on unix.
 
[1] remote means, the application is hosted on a different machine .
[2] I am not sure whether hosting the application on a unix machine orremote machine will not allow to read the clipboard data from the client machine
 
I can only see piling up terms with more or less precise meaning. I can't say I can help.
 
window.clipboardData.getData is an IE only function. It will not work on anything but IE.

with that said, the actual server serving up the files should not matter.

Your client machine however will need to be Windows, as a clipboard is a windows only functional item. not available anywhere else.






----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
How are you setting the data? There may be nothing to retrieve.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
I am not setting the data. I have an input text box where users enter(paste) their id. Based on that id I need to select the corresponding option in the select beside it. Seems like there is no onafterpaste() event to read the data from the input text box. The only option that is left( as per my knowledge) is to read the data from the clipboard that they are trying to paste into the input text box. For that I am using window.clipboardData.getData.
 
O.k. I get the scenario now.

I don't have a linux server handy right now. but I'm not sure that would affect it. Are you sure there's nothing being changed by the upload? Weird characters have been known to appear when files are uploaded through FTP.

An other issue I can think of is the fact that "text" may need to have a capital T.

Or that maybe some security setting in IE is preventing the script from a remote server from accessing the clipboard object.

Have you tried making the remote Unix server explicitly trusted in IE's security settings?


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top