Javascript control of textarea?

B

bbcrock

Can Javascript control sections of a textarea using divs, etc? We have
templates that unfortunately contain some free-text sections where our
clients cannot come to aggreement. I would LOVE to do a div inside the
textarea and modify it using ajax. I would also like to have a regular
expression look for patterns inside the text area and highlight phone
numbers. this kind of behavior doesn't seem possible. Unfortunately
I'm in a break from a requirements gathering meeting and can't work up
a demo today. Do any of you know if this can work in the IE DOM?

thanks!

Don
 
M

Martin Honnen

Can Javascript control sections of a textarea using divs, etc?
I would LOVE to do a div inside the
textarea and modify it using ajax.

A HTML textarea contains plain text, not any other HTML elements like
div elements.

If you want editable HTML contents then with IE 5.5 and later on Windows
you can use editable elements with e.g.
<div contenteditable="true">
scripted as
element.contentEditable

IE 5 and later on Windows and Mozilla 1.4 and later on all platforms
also supports editable iframes where you use script to set
iframeDocument.designMode = 'on'
to allow the browser user to edit the iframe contents.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top