Jens Kristensen <gr*****@stofanet.dk> writes:
I have a problem displaying a divbox containing a html-textarea -
everything works fine with "normal" characters. However, when the
textarea contains special chars like <P> or ' , the box fails to show:
What, exactly, is supposed to happen, and what happens (and in which
browser)?
function show(divbox)
{
divbox.style.display='';
}
How is this function called?
<div id="divbox" style="display:none" >
<form action="action.php" method="post>
You are missing a " after "post". That can very well give problems.
<textarea name ="txt">Text</textarea>
</form>
</div>
If the Text in the textarea is for instance
HERE IS A "QUOTE"
it works fine, while
HERE IS A 'QUOTE'
produces an error
Neither " nor ' are special characters in HTML, except inside tags,
so it shouldn't matter which you use.
I guess that the missing " could give that effect.
<br>-tags works fine, but
<p>-tags doesn't
Where? Inside the textarea element?
The content of the textarea is not HTML, and you should not write tags
there. If you need to write the text "<br>", do it as <br>. If you
need a newline, make one in the source.
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'