Looking for a javascript (copy & paste in a form)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi all;

I've tried googling for this and spent a couple of hours looking through a
multitude of java script sites, but couldn't find what I'd like to do;

I've got a number of clients who need to use accented characters in their
content that is served on a DB (MySQL); What I'd like to do is have a list
of accented characters to the side of the input form that they could click
on and the numeric equivalent (i.e. é for " ") would be
automagically inserted at the last cursor position within a textarea or
input box.

I did see one example that was very close to what I wanted to do, but
looking at the source suggested that the entire list needed to be pre-
definded for each and every input field/textarea on the form;

Is this possible - does something like this exist ? (I'm a perl guy, not a
JS guy, thus my ignorance on the subject ;( )

Many thanks for any insights!

Marc Bissonnette
Looking for a new ISP? http://www.canadianisp.com
Largest ISP comparison site across Canada.

Re: Looking for a javascript (copy & paste in a form)

Marc Bissonnette wrote:

Quoted text here. Click to load it

It's no problem adding it at the end of text:

<a href="javascript:makeEl('&#233;')"></a>

function makeEl(el){

var field_obj=document.forms['name_of_form']['form_element_name'];

field_obj.value=field_obj.value + el;


Or something like that.

No way I know to tell the cursors position. In IE you can tell the
location of highlighted text, not in other popular browsers though.

Quoted text here. Click to load it

Me too. But I like javascript.


not a
Quoted text here. Click to load it

Site Timeline