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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disable html tag processing? 2

Status
Not open for further replies.

Cocheez

Programmer
Jun 6, 2001
56
US
Is there a way to disable html tag processing by say using a tag the is designed to do so? For example :

<disableHtmlProcessing>
<b>Hello</b>
<disableHtmlProcessing>

Would Display :
<b>Hello</b>

Rather than the bold text 'Hello'.

-MattU
 
Would this same kind of thing work for Javascript also, or is there a different tag for that?
 
Hi jewel,

It depends of what you want (I can't figure out).

These 2 examples works in javascript:

first example (shows only <b>Hello</b>)
<script language=javascript>
var exp;

exp = 'your text';
exp = exp + '<br>';
exp = exp + '<xmp><b>Hello</b></xmp><br>';
exp = exp + 'continue text';

document.write(exp)
</script>

second example (shows all the javascript code)
<xmp>
<script language=javascript>
var exp

exp = 'your text'
exp = exp + '<br>'
exp = exp + '<b>Hello</b><br>'
exp = exp + 'continue text'

document.write(exp);
</script>
</xmp>

If this is not what you mean, just post more details.

Erik
 
The second example was what I was asking about, thanks a lot.

Jewel
 
Thanks, that is perfect. Just so I can do better research in the future, where did you find that tag? I searched W3C's HTML DTD's for something similar and found nothing. Also I just looked for <xmp> in there and that does not exists either. I would love to get your reference source.

-MattU
 
Hi MattU,

It's from a book &quot;Using HTML4, fourth edition, by Lee Anne Phillips, --Que Corporation--&quot;

But this book is very less from complete :) It's NOT a complete reference at all.
It'was my first HTML book I bought.

Somewhere on the net I read a reference where they said the <xmp> tag is old, so I don't know if new browsers will support it. I use (IE4.0 and NN4.73)

So please let me know in wich new browsers you can test if it works? (please other members , let me know to)

Erik
 
Works in IE 6 also. Thanks again !!

-MattU
 
Hi all,

Just thought I'd throw some info your way, as I found the posts and thread interesting (and useful).

* the XMP tag was defined prior to HTML 2.0 (not sure when) so that marked text &quot;could contain any ISO Latin printable characters, including the tag opener, so long as it does not contain the closing tag in full.&quot;,
but was marked as obsolete sometime in 1995 (
* All the info I could find on the XMP tag indicates that PRE should be used instead - &quot;a number of unfortunate interactions with processing techniques and tends to be used and implemented inconsistently.&quot;

I tried out the PRE tags with Boomerangs examples, but didn't acheive the same effect.

I know its not a contribution to the solution, just thought some of you might be interested in a bit of history :)

Enjoy...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top