By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,986 Members | 2,030 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,986 IT Pros & Developers. It's quick & easy.

html in textarea

P: n/a
Hi all

I am adding signature in textarea which is stored as text in database
now if i add html tags to it and later retrieve it in textarea it
shows all tags of html but not their function. How i can get proper
signature with html function.
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
megha wrote:
Hi all

I am adding signature in textarea which is stored as text in database
now if i add html tags to it and later retrieve it in textarea it
shows all tags of html but not their function. How i can get proper
signature with html function.


You should not use a JTextArea for that, but instead use a JEditorPane or
JTextPane for this.
Brgds, Herman
--
Suse Linux Professional 8.1 on Athlon 1.1 Ghz 512 Mb
Anti Spam = remove the "dot" and the "at"
Registered Linux User #264690
Visit us : http://users.skynet.be/herman.timmermans
Jul 17 '05 #2

P: n/a
I am not using any of this infact it is a plane textarea of html in
jsp file but is not doing the proper functioning please advice.

Thanks


Herman Timmermans <ti********************@skynet.be> wrote in message news:<40**********************@news.skynet.be>...
megha wrote:
Hi all

I am adding signature in textarea which is stored as text in database
now if i add html tags to it and later retrieve it in textarea it
shows all tags of html but not their function. How i can get proper
signature with html function.


You should not use a JTextArea for that, but instead use a JEditorPane or
JTextPane for this.
Brgds, Herman

Jul 17 '05 #3

P: n/a
megha wrote:
I am not using any of this infact it is a plane textarea of html in
jsp file but is not doing the proper functioning please advice.

Thanks


Herman Timmermans <ti********************@skynet.be> wrote in message
news:<40**********************@news.skynet.be>...
megha wrote:
> Hi all
>
> I am adding signature in textarea which is stored as text in database
> now if i add html tags to it and later retrieve it in textarea it
> shows all tags of html but not their function. How i can get proper
> signature with html function.


You should not use a JTextArea for that, but instead use a JEditorPane or
JTextPane for this.
Brgds, Herman


Maybe you should be a little more precise and clear in stating your problem.
Maybe you can post the source code of the JSP and post as well the signature
you want to display ?
Herman
--
Suse Linux Professional 8.1 on Athlon 1.1 Ghz 512 Mb
Anti Spam = remove the "dot" and the "at"
Registered Linux User #264690
Visit us : http://users.skynet.be/herman.timmermans
Jul 17 '05 #4

P: n/a
An html textarea tag will not render html.. it will only show text, so your
html will not be rendered in the text area, it is not designed for that.

What you could do is a preview pane with a div tag and use javascript on the
client side to populate the div tag using the innerHTML property of a div.
This would then render the html. Or display the html in any other way... it
won't be rendered in a textarea, as far as I know.

hope this helps

cheers
Martin

--

---------------
http://www.nonstoploop.co.uk/ - dynamic websites
http://www.rossanobacchin.be/ - fine art
http://www.weycameras.co.uk/ - photographic supplies
---------------

"megha" <me***@4cplus.com> wrote in message
news:ee*************************@posting.google.co m...
Hi all

I am adding signature in textarea which is stored as text in database
now if i add html tags to it and later retrieve it in textarea it
shows all tags of html but not their function. How i can get proper
signature with html function.

Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.