wmac Posted February 14, 2010 Share Posted February 14, 2010 Hello I have a strange problem with textarea tag. When I load a string which contains encoded html into it, it decodes "encoded htmls" when showing the text. I want the encoded parts to remain encoded. (if I echo it normally and view the source of the page, the encoded html has remained encoded, while in textarea it is being shown decoded). Anyone can help? Thank you very much. <textarea cols=80 rows=20><p>We can use a background picture for web pages instead of background color. <BODY> tag in HTML code can be extended to include an image file name as the background of the page. Let's assume we have an "image1.gif" file and we want to use it as background. Image file must be in the same folder as our html file otherwise browser will not be able to find it. (Or you can add the file path to the image file name). </p> <p>Example 1-3: <span style='font-weight:normal'>page1-3.html</span></p> <p><HTML><br> <HEAD><br> <TITLE>My company web page</TITLE><br> </HEAD><br> <BODY BACKGROUND="image1.gif"><br> Welcome to our homepage. More text here.<br> </BODY><br> </HTML></p> <palign=center><br> <img width=438 height=321 src='images/image008.jpg'></p></textarea> - Please see the snapshot of the produced textarea here Quote Link to comment Share on other sites More sharing options...
yozyk Posted February 14, 2010 Share Posted February 14, 2010 Textarea is similar to the input tag. Inside the textarea there should be no other tags... Quote Link to comment Share on other sites More sharing options...
yozyk Posted February 14, 2010 Share Posted February 14, 2010 If you want block with scroling use div and css overfow: scroll Quote Link to comment Share on other sites More sharing options...
jl5501 Posted February 14, 2010 Share Posted February 14, 2010 yozyk, a textarea is used by a CMS system to enter html for other pages. Quite often hidden by the use of a wysiwyg editor, but does not need to be. Quote Link to comment Share on other sites More sharing options...
yozyk Posted February 14, 2010 Share Posted February 14, 2010 yozyk, a textarea is used by a CMS system to enter html for other pages. Quite often hidden by the use of a wysiwyg editor, but does not need to be. But inside the textarea only CDATA can be used. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.