table, etc tags in TEXTAREA

N

Ness Mountain

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.
 
S

SpaceGirl

Ness said:
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.

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


<textarea><h1>hello world</h1><p>hi!</p></textarea>


....is 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 @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
G

Guest

Ness Mountain said:
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.

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. %-|

Jamie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top