Jump to content

<textarea> problems


Belzar

Recommended Posts

Hi everyone, I am trying to make a <textarea> with code inside of it on my website, like they have here, and I know I have seen it on other sites. When I do it on my site, it always just runs the code, it will not let me just have the code so I can show what certain codes are... Can anyone help me please?

Link to comment
Share on other sites

Hi everyone, I am trying to make a <textarea> with code inside of it on my website, like they have here, and I know I have seen it on other sites. When I do it on my site, it always just runs the code, it will not let me just have the code so I can show what certain codes are... Can anyone help me please?
Could you supply an example? Maybe link to the page in question, or post the HTML that you are using.As far as I can tell, you shouldn't have to do anything special to make code appear as code inside the textarea. The test page I did with some HTML insde the textarea tags worked...
<html><body><textarea cols="50" rows="10"><table><tr><td>cell 1</td></tr></table><br /><script type="text/javascript"><!--alert('hello');--></script></textarea></body></html>

Link to comment
Share on other sites

Could you supply an example? Maybe link to the page in question, or post the HTML that you are using.As far as I can tell, you shouldn't have to do anything special to make code appear as code inside the textarea. The test page I did with some HTML insde the textarea tags worked...
<html><body><textarea cols="50" rows="10"><table><tr><td>cell 1</td></tr></table><br /><script type="text/javascript"><!--alert('hello');--></script></textarea></body></html>

What I am trying to do is make it so you can copy the code from my page and put it on myspace comments... I hate to show this, cuz its a lil vulgar or bad, but the thing i want to be able to use this for is at http://droppingthebomb.com/ecards/######/pony2.htm when i put the code inside the box, it looked like it was just showing it as it would on the web page, but i didnt upload it to try cuz i didnt think it would work... it looked something like this:
<textarea><font color='FF0066' size='7'>Don't mind me,<br><a href='http://droppingthebomb.com'><embed img src='http://droppingthebomb.com/gfx/tampon.jpg'></a><br>I'm riding the cotton pony.</font></textarea>

Link to comment
Share on other sites

Well, from that page, there isn't any textarea, so I can't see really what the issue is... The code you posted works fine for me when I save it as an HTML page and view it on my computer.If all else fails, then you can always replace the "<" and ">" with "&lt;" and "&gt;" and put the code insde another container, like DIV tags...

Link to comment
Share on other sites

Well, from that page, there isn't any textarea, so I can't see really what the issue is... The code you posted works fine for me when I save it as an HTML page and view it on my computer.If all else fails, then you can always replace the "<" and ">" with "&lt;" and "&gt;" and put the code insde another container, like DIV tags...
Great it does work, it just doesnt look like it does inside dreamweaver... thanks for all the help :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...