PDA

View Full Version : HTML markup in Ext textfield



choncona1
20 Oct 2010, 11:53 PM
hi guy,
I am having a problem.
I want to insert the below message into a textfield:

<font color=darkgreen> Due To System Server Maintenance, Systems Are Temporary Unavailable.
Obviously, it doesn't show any color.
So I would like to ask for any methods that could bring the HTML markup onto the display.
I am really appreciated for the time that you spend in reading my problem
Thank you very much

Stoot98
21 Oct 2010, 1:49 AM
Use CSS! Add a class (or inline style) to the textfield with the color set to darkgreen.




.textfield
{
color: darkgreen;
}

...

{
xtype: 'textfield',
cls: 'textfield'
}



Friends don't let friends use font tags (http://www.communitymx.com/blog/index.cfm?newsid=244)

choncona1
21 Oct 2010, 2:35 AM
hi,
Thank you for your fast reply.
The thing is, that is a whole message which take directly from database
If you put the exact message into Combo box or Grid then it will show you the color
but it doesn't when comes to Textfield.
And as you can guess, other messages have different styles
Is there anything that make it dynamic?