473,408 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Mozilla / Firefox equivalent to IE onpaste for textareas

Is there anything for Mozilla or Firefox that would be equivalent to
IE's onpaste event for a textarea?

Jul 23 '05 #1
7 26952

Mark Szlazak wrote:
Is there anything for Mozilla or Firefox that would be equivalent to
IE's onpaste event for a textarea?


I should add that using onchange presents a problem since the event
doesn't fire until the textarea looses focus. Whatever solutions that
exist need to work like onpaste without the focus issues of onchange.

Jul 23 '05 #2
DU
Mark Szlazak wrote:
Mark Szlazak wrote:
Is there anything for Mozilla or Firefox that would be equivalent to
IE's onpaste event for a textarea?


There is no equivalent to onpaste event for a textarea, as far as I
understand your post.
"Fires on the target object when the user pastes data, transferring the
data from the system clipboard to the document."
http://msdn.microsoft.com/workshop/a...ts/onpaste.asp
I should add that using onchange presents a problem since the event
doesn't fire until the textarea looses focus. Whatever solutions that
exist need to work like onpaste without the focus issues of onchange.


Maybe if you could provide an url showing how your script works for
MSIE, I could have a look at it and maybe propose an alternative.

DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.6 :)
Jul 23 '05 #3
DU wrote:
Maybe if you could provide an url showing how your script works for
MSIE, I could have a look at it and maybe propose an alternative.

DU


Thanks for the offer DU but I do have alternatives. However, I need to
seriously consider this particular option if a viable one exists.

Jul 23 '05 #4


Mark Szlazak wrote:
Is there anything for Mozilla or Firefox that would be equivalent to
IE's onpaste event for a textarea?


You could try to use
<textarea oninput="..."
with Mozilla, of course it doesn't fire only for text being pasted but
also for other text manipulation like cutting text but at I think it is
the only event handler in Mozilla and HTML documents being fired when
text is pasted into a text control.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #5

Martin Honnen wrote:
Mark Szlazak wrote:
Is there anything for Mozilla or Firefox that would be equivalent to IE's onpaste event for a textarea?
You could try to use
<textarea oninput="..."
with Mozilla, of course it doesn't fire only for text being pasted

but also for other text manipulation like cutting text but at I think it is the only event handler in Mozilla and HTML documents being fired when text is pasted into a text control.

--

Martin Honnen
http://JavaScript.FAQTs.com/


That will work just fine. Thanks.

Jul 23 '05 #6
Martin Honnen wrote:
Mark Szlazak wrote:
Is there anything for Mozilla or Firefox that would be equivalent to
IE's onpaste event for a textarea?


You could try to use
<textarea oninput="..."
with Mozilla, of course it doesn't fire only for text being pasted but
also for other text manipulation like cutting text but at I think it is
the only event handler in Mozilla and HTML documents being fired when
text is pasted into a text control.


frm.ctlName.addEventListener("DOMCharacterDataModi fied",
function(e){myEventHandler(e);}, false);

This method works, but it has several minor bugs which I logged at:
https://bugzilla.mozilla.org/show_bug.cgi?id=285272

Also, note that if you do something like select the 5 in 54321
and then press 6 (changing the text to 64321) you will fire twice:
The first time the value will be 4321,
and the second firing will have 64321

Csaba Gabor from Vienna
Jul 23 '05 #7
ok

----------------------------------------------
Posted with NewsLeecher v2.0 Beta 5
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------
Apr 19 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: AP | last post by:
LS, Is their a way of using then command 'onPaste' and 'onDragLeave' or an alternative in PHP. Needed to paste a selected text in a textarea and after paste executing a PHP script without to...
3
by: John Reese | last post by:
Mozilla, Firefox, Thunderbird, and so forth use this awful format called MORK to store all kinds of things: which messages you've read in a newsgroup, headers and indexes into the mbox file of...
6
by: Red_Indian | last post by:
Hi How do I accomplish the following functionality in Mozilla/ Firefox: document.form.textbox.disabled = false if I want to conditionally enable a text box that was disabled by default. ...
49
by: Aidan | last post by:
I rely heavily on MSDN for documentation when it comes to HTML/DHTML/JavaScript/CSS but as a result I often have problems getting my stuff to work in Netscape/Mozilla/Firefox. I like the MSDN...
9
by: Paul Gorodyansky | last post by:
Hi, FAQ tells how to insert (or replace0 a text at a caret position in Mozilla (and same works for Opera 8+), for example, at http://www.faqts.com/knowledge_base/view.phtml/aid/1661 it talks...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
1
by: rjdougan | last post by:
I am not a developer but need some help with scripts for a client. I have a script to handle form validation and one that handle mouseover on menu. The form validation script works fine by it...
3
by: svsenthilkumar | last post by:
hai , i got an error in javascript, when upload a file in a form, the code is working properly in IE but i got javascript error in Mozilla firefos what is mean by error and how to rectify...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
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,...
0
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...

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.