Page 1 of 1

Textarea

Posted: Thu Nov 02, 2006 4:49 am
by catalaur
Hi . I have to problems with php.
First one:
I use a javascript function for making text bold in textarea field. That functions puts something like this: text how can i change that to <b>.
Any php function for that?

And the second one also with textarea
I want to have in the lift side of textarea a frame or something that counts the current line number and that is scrolled in the same time with textarea.

Any idea?

Posted: Thu Nov 02, 2006 5:43 am
by onion2k
Moved to clientside.

All these things will require JavaScript rather than PHP.

Posted: Thu Nov 02, 2006 8:24 am
by catalaur
No problem. But how can i do that with jscript?

Posted: Thu Nov 02, 2006 10:27 am
by Maugrim_The_Reaper
If you want to see the actual tags just use:

[/syntax]document.getElementById('textarea_id').innerHTML = '<b>' + {put your text to be bolded} + '</b>';

Code: Select all


You'll see the <b> tags and they'll not be parsed by browser - makes sure you're actually using a textarea...