The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> scroll box?
balthasar
post Feb 26 2007, 03:17 PM
Post #1





Group: Members
Posts: 2
Joined: 26-February 07
Member No.: 2,034



Hey I wanted to help my friend out with some html over the internet and I was wondering if someone could tell me how to place the codes inside a sroll box without the html functioning as html, if you know what I mean. thanks!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Feb 26 2007, 03:37 PM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Please see the FAQ entry How can I show HTML examples without them being interpreted as part of my document?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
balthasar
post Feb 26 2007, 03:56 PM
Post #3





Group: Members
Posts: 2
Joined: 26-February 07
Member No.: 2,034



that helps, thanks. But is there any way to indicate a big section of text so that it's not interpreted? Say if I wanted to post a whole layout, it would be rather hard to go through and replace everything.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Peter1968
post Feb 26 2007, 04:28 PM
Post #4


Serious Coder
*****

Group: Members
Posts: 448
Joined: 23-September 06
Member No.: 213



One way I can think of off the top of my head would be to embed the markup you want to illustrate inside an iframe and have the server deliver it as text/plain.

I guarantee you there are more elegant methods, but that's one I can think of.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Feb 26 2007, 04:34 PM
Post #5


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



QUOTE(Peter1968 @ Feb 26 2007, 01:28 PM) *
One way I can think of off the top of my head would be to embed the markup you want to illustrate inside an iframe and have the server deliver it as text/plain.
Except that a certain browser-like OS component is likely to interpret it as text/html anyway.

Another option is to post a sample document, and let them View Source if they want to copy the source.

Another option is to create a simple script to do the conversion for you.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Peter1968
post Feb 26 2007, 07:11 PM
Post #6


Serious Coder
*****

Group: Members
Posts: 448
Joined: 23-September 06
Member No.: 213



QUOTE(Darin McGrew @ Feb 27 2007, 08:34 AM) *
Except that a certain browser-like OS component is likely to interpret it as text/html anyway.


Yep, you're right.

Example

IE 7.0 insists on marking up the plain text content of the iframe. Firefox and Opera get it right, of course. So much for that idea...

Actually, IE 7.0 inists on word-wrapping the text in the frame as well. How nice of it to do that, though it shouldn't.

This post has been edited by Peter1968: Feb 26 2007, 07:17 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 26 2007, 08:14 PM
Post #7


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



QUOTE(Peter1968 @ Feb 27 2007, 01:11 AM) *

QUOTE(Darin McGrew @ Feb 27 2007, 08:34 AM) *
Except that a certain browser-like OS component is likely to interpret it as text/html anyway.


Yep, you're right.

Example

IE 7.0 insists on marking up the plain text content of the iframe. Firefox and Opera get it right, of course. So much for that idea...

Actually, IE 7.0 inists on word-wrapping the text in the frame as well. How nice of it to do that, though it shouldn't.

My IE6 got it right, but displayed a security warning that the "file content didn't match its security information". wub.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dr Z
post Feb 26 2007, 09:49 PM
Post #8


Advanced Member
****

Group: Members
Posts: 221
Joined: 23-August 06
Member No.: 11



Another quick way ma be is to use the "Find/Replace" function of your text editor. Even Notepad has this capability. Using Notepad as an example. you would do the following:

Find what: <
Replace with: &lt;
And hit the "Replace All" botton

You would repeat it for >/&gt;

Only two actions per page.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Feb 26 2007, 10:19 PM
Post #9


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Note that you need to replace & with &amp; first, and then replace < with &lt; (as the FAQ I cited earlier explains).
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 10:38 AM