473,597 Members | 2,459 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to clear a Clipboard data in Firefox browser

27 New Member
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.g etData("Text");

window.clipboar dData.clearData ('HTML');
document.onmous edown = fnDisable
}

Thanks in advance
May 2 '07 #1
11 18283
rakeshvthu
27 New Member
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.clipboar dData.clearData ();

thnks in advance,
rakesh
May 2 '07 #2
rakeshvthu
27 New Member
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
rakeshvthu
27 New Member
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.clipboar dData.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 Recognized Expert Moderator MVP
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 Recognized Expert Moderator MVP
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
rakeshvthu
27 New Member
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 Recognized Expert Moderator MVP
On your element, call a function onkeyup:
[HTML]<input type="text" name="email2" onkeyup="checkE mail()">[/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
rakeshvthu
27 New Member
On your element, call a function onkeyup:
[HTML]<input type="text" name="email2" onkeyup="checkE mail()">[/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 Recognized Expert Moderator MVP
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

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

Similar topics

8
11457
by: LG | last post by:
Just have a question with regards to the clipboard, and how to read what other applications (Adobe InDesignCS) place in the clipboard. I am currently in the process of creating a booklet from a database, and I need the data to be laid out in a tabular format, and set out in a specific way. At the current point in time, I am copy/pasting the raw text from the database into a table layout in InDesign. What I was thinking is that if I could...
3
2667
by: Du Dang | last post by:
I use this in ie and it works just fine. Hoever when i use it in opera, the browser have a problem with the "createTextRange" bit. ============================= var txtHandler = txt.createTextRange(); txtHandler.execCommand("paste"); ============================= Does anyone knows another method that allows me to paste the text in the clipboard into my textbox?
9
5948
by: Tim Frawley | last post by:
I have converted a VB6 application to VB.NET. The old application made extensive use of the Clipboard for copying an Image Name so that it could be pasted into the image capture app when the user scans the image. My applications run as compiled assemblies from our Intranet server and I have setup a Main sub routine in the application with the following line: <STAThread()> Public Sub Main() Note: There is no timer in this application.
12
6159
by: PMA | last post by:
Hi all, I am porting a web application from IE 6.0 to FireFox 1.5. I have solved almost all compatibility issues (quite a lot but not too bad) except two of them : 1) Clipboard access thru' JavaScript (programmatical copy and paste actions) 2) Monitoring and driving Insert/Overwrite mode on input fields
7
20078
by: Dave Booker | last post by:
My Clipboard is getting into some very confused state where I can't even clear it. No applications can access the clipboard in this state, and if I run Clipboard.Clear() I get: System.Runtime.InteropServices.ExternalException: Requested Clipboard operation did not succeed. at System.Windows.Forms.Clipboard.ThorwIfFailed(Int32 hr) at System.Windows.Forms.Clipbard.SetDataObject(Object data, Boolean copy, Int 32 retryTimes, Int32...
0
3226
by: jen | last post by:
this works fine it i operate on one .doc file; however, if i process multiple files, i get the following error: Requested Clipboard operation did not succeed. i suspect i need to clear my clipboard at some point, er something. in the code below see the comment, as far as clearing the data object... i appreciate any input....thanks to all --
5
2756
by: Steve Richter | last post by:
I am using the window.clipboardData.getData javascript method to copy from the clipboard. <SCRIPT LANGUAGE="JavaScript"> function ShowClipBoard() { var data = window.clipboardData.getData("text") ; alert( data ) ; }
6
4296
by: JohnW-Mpls | last post by:
I'm new to JS. I have some scripts that include a variable that I'd like to have js copy to the Window's Clipboard. Is there a way to do this? FWIW, I have the big O'Reilly book on JS but don't see what I want in there (so far). - JohnW-Mpls
2
2306
by: Vighneswar | last post by:
Hi All Please let me know is there any way to clear the address bar history ( Typed URLs) of Firefox browser programmatically. Deleting 'index.dat' under profiles folder of firefox will delete both ( history and Typed URLs ). Here I need to clear only the address bar history of firefox. Also is there any way to programmatically delete IE7 browser history on Windows Vista. I could able to delete IE7 browser history on Xp machine, but...
0
8276
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8381
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8040
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
8259
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6698
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
5847
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
5436
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3932
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1243
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.