Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ignoring code 1

Status
Not open for further replies.

redletterrocko

Programmer
Aug 8, 2005
53
US
This may be an interesting request, but I've made a class for a <div> element that is called "term" What it does is make the background black, the text white courier, etc, making it appear as a terminal window, so I can print the output of my terminals, etc. I was also wondering if I could find a way to capture code so that it doesn't parse, but is printed raw. Like, start a div and have it ignore all the text until is closes the div, or something like that. Anyone have any ideas?
 
I would suggest you use a readonly textarea. That will simply output the code rather than parse it.
 
As long as the code doesn't contain a closing textarea tag. If there is any chance that it will, you will need to escape the opening less-than of the close tag by changing this:

Code:
</textarea>

to this:

Code:
&lt;/textarea>

Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top