table, etc tags in TEXTAREA

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Help?  I need to display (and allow user to edit) tags such as <table>,
<tr>, and <td> inside a textarea box.  The problem is -- even though they
show up, and you can edit them, they screw up the formatting of my page.  
It's weird.  It does it in various browsers.

Is there some way to tell the browser they're just there to be edited?

Thanks for your help.

Re: table, etc tags in TEXTAREA

Ness Mountain wrote:
Quoted text here. Click to load it

You CANNOT put HTML tags *inside* a text area...

<textarea><h1>hello world</h1><p>hi!</p></textarea> totally illegal HTML. You need to find a different way of doing
it. As the name suggests, a textarea is for TEXT, not HTML tags. One
caveat; if you want to give the appearance of displaing HTML inside a
textarea, replace all of your < > with &lt; and &gt;. At least then it
wont wreck your page...


x theSpaceGirl (miranda)

# lead designer @ #
# remove NO SPAM to email, or use form on website #

Re: table, etc tags in TEXTAREA

Quoted text here. Click to load it

Have you tried escaping the <'s? &gt; &lt; &amp; &quot; etc..

If you don't it could be a problem if you ever wanted to edit textarea
tags within a textarea. %-|

-- Custom web programming
guhzo_42@lnubb.pbz (rot13)                User Management Solutions

Site Timeline