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

how to set values other than text in textarea using javascript???

P: 43
hi
i wish to set output of a jsp page having tabular data along with colors and fonts
into the textarea using javascript....

is it possible via javascript????
if yes how?//
any alternative....
Jul 10 '07 #1
Share this Question
Share on Google+
3 Replies


acoder
Expert Mod 15k+
P: 16,027
You could search for "javascript textarea editor" or something similar. There are editors which convert textareas into WYSIWYG editors though that might be a bit too much for what you require.
Jul 10 '07 #2

100+
P: 201
hi
i wish to set output of a jsp page having tabular data along with colors and fonts
into the textarea using javascript....

is it possible via javascript????
if yes how?//
any alternative....
It is Possible. Declare a Javascript variable and assign value to it. I assume data is coming from JSP using database connection. Use proper jsp tag to assign value <%= %> to javaScript variable.
now set value of textarea to the variable of javascript.
Jul 10 '07 #3

acoder
Expert Mod 15k+
P: 16,027
hi
i wish to set output of a jsp page having tabular data along with colors and fonts
into the textarea using javascript....
Show an example of your data. You can use styles to set the colors and fonts, e.g.
Expand|Select|Wrap|Line Numbers
  1. color: red;
  2. font-family: arial, helvetica, sans-serif
or with javascript:
Expand|Select|Wrap|Line Numbers
  1. obj.style.color = "red";
  2. obj.style.fontFamily = "arial, helvetica, sans-serif";
Jul 11 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.