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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript onbeforepaste event

Status
Not open for further replies.

shams123

Programmer
Joined
Jan 27, 2006
Messages
81
Location
MY
Hi guys,

I am trying to use javascript events in my Editor.

Editor.attachEvent("onmousedown",richtextClick);
Editor.attachEvent("ondblclick",richtextDoubleClick);
Editor.attachEvent("ondeactivate",richtextUpdate);
Editor.body.attachEvent("onbeforepaste",richtextBeforePasteOptions);
Editor.body.attachEvent("onpaste",richtextPasteOptions);

Now if a person tries to paste (using Ctrl+V), I pop up a message for instructions. However, for some strange reason, if I try to right click in the Editor, I get the message that's being used for onpastebefore TWICE (should be just once)!.

Help needed!!

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top