ASP.NET - Inserting text at any position from a button

Asked By Jim Orchard on 13-Jan-10 04:21 PM

I have 3 text boxes on a page. With the cursor in any box, I want the user to be able to click a button, opening a modal popup, choose an option from  a dropdown in the popup, and then click submit, entering the dropdown.value at the cursor position. Is this possible?

I have the pop-up all set up, but need the function to insert the dropdown.value into the text area.

I've tried some solutions I found online and none seem to work. Any help here?

Thanks.

Jim

insert desired text at the cursor position in a text area - mv ark replied to Jim Orchard on 13-Jan-10 10:21 PM

Adapt the snippet at this link & use the custom function called insertString() to insert desired text at the cursor position in a text area - http://en.allexperts.com/q/Javascript-1520/Inserting-text-text-area.htm