Welcome Guest ( Log In | Register )



3 Pages V  < 1 2 3 >  
Reply to this topicStart new topic
> disable html tags
overture
post Oct 20 2004, 01:49 PM
Post #11


Premium Member
Group Icon

Group: Members
Posts: 208
Joined: 6-September 04
From: England
Member No.: 315



wasnt this solved in the first reply by lhunath? being as it was the right answer. at least in my mind it was.
Go to the top of the page
 
+Quote Post
lhunath
post Oct 20 2004, 02:48 PM
Post #12


Premium Member
Group Icon

Group: [HOSTED]
Posts: 224
Joined: 13-October 04
From: Belgium
Member No.: 1,160



QUOTE(overture @ Oct 20 2004, 03:49 PM)
wasnt this solved in the first reply by lhunath? being as it was the right answer. at least in my mind it was.
*


That's what I thought, but what the heck, if they want to go and replace all < with &lt; 's and > with &gt; 's, then fine with me; I won't be the one writing it tongue.gif
Go to the top of the page
 
+Quote Post
r3d
post Oct 20 2004, 04:58 PM
Post #13


death
Group Icon

Group: Members
Posts: 268
Joined: 8-September 04
Member No.: 384



QUOTE(kilz @ Oct 20 2004, 01:16 PM)
in php, we can use htmlspecialchars() to display and disable html.
in javascript, how??
I would like to create some html tutorial for my site, so disable them.
*



eerrrr don't do this, don't use js or php to disable html code. once you did this, is just like opening a door to a script kiddies wink.gif
just use html entities e.g. &lt; = <, &gt = >, &copy; = © and soon...
html entities whon't envote any markup it just kind a replacement...
Go to the top of the page
 
+Quote Post
Bigyan
post Oct 26 2004, 05:12 AM
Post #14


Member - Active Contributor
Group Icon

Group: Members
Posts: 80
Joined: 12-October 04
Member No.: 1,148



The cleanest way to go about doing this would be :
>> Use Javascript to write a parser (its going to be tough)
>> Use server side scripting.

But anyway, what do you want this for ???
Go to the top of the page
 
+Quote Post
avalon
post Oct 27 2004, 08:54 PM
Post #15


Advanced Member
Group Icon

Group: Members
Posts: 160
Joined: 27-October 04
Member No.: 1,260



There is a much simplier way that works all the time.

See Code
CODE

<textarea cols="25" rows="5">
<b>My Name</b>
</textarea>
Go to the top of the page
 
+Quote Post
lhunath
post Oct 27 2004, 10:09 PM
Post #16


Premium Member
Group Icon

Group: [HOSTED]
Posts: 224
Joined: 13-October 04
From: Belgium
Member No.: 1,160



Ewwww for fuks sake urgh bluergh.
Sorry. =)
How absolutely fucked up and lame.
Textarea was made for user interactive text.
There is a HTML Tag designed for THIS. It's called PRE.
<pre></pre>

How hard can it be? Why make your page as ugly as hell? Use weird server side scripts, ugly Javascript or fucked up HTML? W3C designed you a tag that does the trick perfectly.
Use it!
Go to the top of the page
 
+Quote Post
r3d
post Oct 28 2004, 03:07 AM
Post #17


death
Group Icon

Group: Members
Posts: 268
Joined: 8-September 04
Member No.: 384



lhunath behave remember your admin now wink.gif
and about that pre it still parse html tags tongue.gif
Go to the top of the page
 
+Quote Post
avalon
post Oct 28 2004, 06:52 AM
Post #18


Advanced Member
Group Icon

Group: Members
Posts: 160
Joined: 27-October 04
Member No.: 1,260



I dun agree with you, textarea it can be very nice too, if you know how to implement style sheet to it. I believe you are not a designer, at least not a commercial designer that earn praises from your customers.

I am a very experience designer whom had worked with many companies in various industries doing many types of designs and assisted in various applications development in various languages.

Prove me wrong and I will apologize.
Go to the top of the page
 
+Quote Post
avalon
post Oct 28 2004, 07:06 AM
Post #19


Advanced Member
Group Icon

Group: Members
Posts: 160
Joined: 27-October 04
Member No.: 1,260



It's pretty obvious what the user had in mind when he/she ask to display HTML tag code without randering it as HTML result.

Using textarea enable the code creator to achieve what he/she is looking for with minimal or no problem from the end user. It can be styled with size, colored, background image with no border and scoll bar. It still enable end users to copy the code, paste and save as it is without needing to make any changes.

If you want to know how, just ask kindly and you shall be answered.
Go to the top of the page
 
+Quote Post
lhunath
post Oct 28 2004, 01:35 PM
Post #20


Premium Member
Group Icon

Group: [HOSTED]
Posts: 224
Joined: 13-October 04
From: Belgium
Member No.: 1,160



Actually, you being a very experienced designer, should know that styling a textarea with CSS is a pain in the backside. A huge range of browsers don't properly support decent styling of it, for example border, background, ...
By the way, Textarea has the annoyance of a user being able to edit the text, which is not the intention. Unless if you disable it with ugly JavaScript or something.
Copying the code is just as easy with any other solution and doesn't require you to be able to edit it. Any why would one want to edit the code? There's no use for it .. just confuses users making them think that there is use, and they just didn't see it.

By the way, sorry for my lil outburst there =) I honestly meant it less than half as bad as it sounded. I guess I was annoyed. It was nothing personal.
r3d, btw, you're kinda right tongue.gif I'll update the rules for this place soon though, and state that nobody can do things like that again except for me xD no, really, I ought to set an example. Therefore, appologies wink.gif

Oh and, I noticed pre, q, code & ... tags do still parse other tags contained in them. Bummer. I was wrong about that then. *sigh* Only way is the lame way then. You disappoint me W3C.
And, appologies for that as well wink.gif I owe them.

~lhunath
Go to the top of the page
 
+Quote Post

3 Pages V  < 1 2 3 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Basic Tips and Tricks in HTML(15)
  2. Embedding XML into HTML(2)
  3. Div Tags Vs Tables For Layout(10)
  4. Force Object To Load Last(2)
  5. Free Shoutbox? HTML, Flash or PHP Code(24)
  6. Here Are Some Html Tutorial Sites(1)
  7. Get Input From Html/txt File?(2)
  8. How Can You Spice Up Your Basic HTML Site ? Beginner Needs Help(9)
  9. HTML Editor(23)
  10. Need Help With The HTML HR Tag(5)
  11. HTML: Seems Like A Simple Problem, But I'm Baffled!(4)
  12. Where To Find A WML To HTML Converter ?(2)
  13. A First Peep Into Html(5)
  14. Home Videos(4)
  15. Bulletproof HTML: 37 Steps To Perfect Markup(4)
  1. Quick Tips On Html And Css(11)
  2. Firefox Inventing Its Own Html?(9)
  3. Scripts And Html(13)
  4. Stretching My Site Vertically(6)
  5. Html Stats(3)
  6. About Html(15)
  7. Html Table Issue.(18)
  8. Html Emails How?(12)
  9. Sitepoint's Css And Html Reference Sites(2)
  10. Yaml - (x)html/css Framework(2)
  11. Style P And H? Html Tags(2)
  12. Indentation In Html(4)
  13. Good Books For Html And Css Beginners(1)


 



- Lo-Fi Version Time is now: 5th December 2008 - 05:01 PM