only way I can think is to save the form field to a js array every time the
user clicks / presses a key... but that could be time consuming to undo if
you have to go back one letter at a time...

-----Original Message-----
From: DeVoil, Nick [mailto:[EMAIL PROTECTED]]
Sent: 14 March 2001 14:11
To: CF-Talk
Subject: RE: Using javascript to create an Undo - the return


I think you would need to trap every key depression and mouse click
while they were in the textarea.

The problem is, you would need to know where the text pointer was at
any moment, and I don't see how you could do that reliably if they
used the mouse to reposition it.

Nick

-----Original Message-----
From: James Maltby [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 1:37 PM
To: CF-Talk
Subject: Using javascript to create an Undo - the return


Hi - posted this recently but still no resolution:

Have a cf forum we have written, with javascript "Word" like buttons that
output html for <b>, <i> and <u> in the input textarea - would like to
include an "undo" function with acts like ctrl+Z from the keyboard - in that
it will remove either the last piece of text written, or the inputted
<b></b> (etc) tags - any suggestions?

James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to