|
|
|
|
![]() ![]() |
Oct 20 2004, 01:49 PM
Post
#11
|
|
|
Premium Member 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.
|
|
|
|
Oct 20 2004, 02:48 PM
Post
#12
|
|
|
Premium Member 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 < 's and > with > 's, then fine with me; I won't be the one writing it |
|
|
|
Oct 20 2004, 04:58 PM
Post
#13
|
|
|
death 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 just use html entities e.g. < = <, > = >, © = © and soon... html entities whon't envote any markup it just kind a replacement... |
|
|
|
Oct 26 2004, 05:12 AM
Post
#14
|
|
|
Member - Active Contributor 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 ??? |
|
|
|
Oct 27 2004, 08:54 PM
Post
#15
|
|
|
Advanced Member 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> |
|
|
|
Oct 27 2004, 10:09 PM
Post
#16
|
|
|
Premium Member 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! |
|
|
|
Oct 28 2004, 03:07 AM
Post
#17
|
|
|
death Group: Members Posts: 268 Joined: 8-September 04 Member No.: 384 |
lhunath behave remember your admin now
and about that pre it still parse html tags |
|
|
|
Oct 28 2004, 06:52 AM
Post
#18
|
|
|
Advanced Member 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. |
|
|
|
Oct 28 2004, 07:06 AM
Post
#19
|
|
|
Advanced Member 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. |
|
|
|
Oct 28 2004, 01:35 PM
Post
#20
|
|
|
Premium Member 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 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 ~lhunath |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 5th December 2008 - 05:01 PM |