469,307 Members | 1,796 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

How to clear a Clipboard data in Firefox browser

hi all,

i am new bee to script and some how i find code to clear data of clipboard it is working fine for IE browser not for Firefox can any one help me out what all we need to change in order to work it for Firefox it is preety urgent.................

function fnClearData(){
var content = clipboardData.getData("Text");

window.clipboardData.clearData('HTML');
document.onmousedown = fnDisable
}

Thanks in advance
May 2 '07 #1
11 17391
hi all

the below statement is working well for IE but not for Firefox how to use it for Firefox pls any one help on this issue it is urgent...............

window.clipboardData.clearData();

thnks in advance,
rakesh
May 2 '07 #2
but can any one suggest which is the alternative method i need to use for that method in order to work it for Firefox browser
May 2 '07 #3
hi all i have two text boxes here

Enter Email:

Confirm Email:

i have a requirement stating that i should not enable user to copy the email from first text box and paste it in other.

so i have used a technique of clearing a clipboard that has worked fine until i have tested for IE when i tested with Firefox it is not working i used the code to clear clipboard is

window.clipboardData.clearData();

now wht should i do to work it for Firefox..............................

and one more ?? is did i used the correct way for my reqiurement..................

pls suggest me and also suggest me wht is the technique i have to use this is very urgent pls help me out in this issue........................

thanks in advance,
rakesh
May 2 '07 #4
acoder
16,027 Expert Mod 8TB
I have merged all your threads because they were on the same topic.

Please do not double/triple post.
May 2 '07 #5
acoder
16,027 Expert Mod 8TB
What is clipboardData? Is that the actual clipboard on the OS?

If so, you can't touch that with Firefox and rightly so. Are you using ActiveX to get the clipboard data?

Think of an alternative, e.g. detect key presses on the text field. If it automatically reached the same as the first text box, they must have copied the data. If it is incrementing then you know that they haven't simply copied. Use the onkeyup event handler.

The reason why your approach is wrong is that the user may not have copied the email, but some other important data.
May 2 '07 #6
What is clipboardData? Is that the actual clipboard on the OS?

If so, you can't touch that with Firefox and rightly so. Are you using ActiveX to get the clipboard data?

Think of an alternative, e.g. detect key presses on the text field. If it automatically reached the same as the first text box, they must have copied the data. If it is incrementing then you know that they haven't simply copied. Use the onkeyup event handler.

The reason why your approach is wrong is that the user may not have copied the email, but some other important data.

thankyou sir,

but it is not that much clear to me if i use onkeyup handler i have to handle lot of things with respect to copying, because user may use his tab key to come to other text box then it is also one of the key up event and can u send me the code how to handle this situation hoping for reply thank u in advance
May 3 '07 #7
acoder
16,027 Expert Mod 8TB
On your element, call a function onkeyup:
[HTML]<input type="text" name="email2" onkeyup="checkEmail()">[/HTML] Then in checkEmail check that they are not the same. Use a global variable for this. If they are the same in one go, that means the user has copied and pasted. If they are not the same, but the first few characters are the same, then you know that they are typing the email again.
May 3 '07 #8
On your element, call a function onkeyup:
[HTML]<input type="text" name="email2" onkeyup="checkEmail()">[/HTML] Then in checkEmail check that they are not the same. Use a global variable for this. If they are the same in one go, that means the user has copied and pasted. If they are not the same, but the first few characters are the same, then you know that they are typing the email again.

thank u but i have implemented it in a different way

thanks for u r guidance
May 9 '07 #9
acoder
16,027 Expert Mod 8TB
thank u but i have implemented it in a different way

thanks for u r guidance
Oh well, at least you got it working.
May 9 '07 #10
thank u but i have implemented it in a different way

thanks for u r guidance
Can you please let us know in which way you implemeted this? Now I am facing the same problem & would like to hear from you in resolving this issue.

Thank you,
Murthy.
Nov 27 '07 #11
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!
Can you please let us know in which way you implemeted this? Now I am facing the same problem & would like to hear from you in resolving this issue.
Can you explain what you're trying to do? As explained earlier, you can't clear the clipboard in Firefox or any other non-IE browser.
Nov 27 '07 #12

Post your reply

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

Similar topics

3 posts views Thread by Du Dang | last post: by
7 posts views Thread by Dave Booker | last post: by
5 posts views Thread by Steve Richter | last post: by
6 posts views Thread by JohnW-Mpls | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.