Re: [WSG] .htm include file into another .htm

2006-01-19 Thread Elton Okada
On IIS you can use server side includes in a .htm file.Do this: Open IIS - website (righ button) - properties - home directory - configuration - Add. So, you will associate the .dll asp to .htm extension like this:
 Executable: C:\WINDOWS\system32\inetsrv\asp.dll Extension: .htmRegardsEltonOn 1/18/06, Jona Decker
 [EMAIL PROTECTED] wrote:You wrote:
Using standards, which is the best way to achieve this:1. !--#include virtual=/included.htm --2. !--#include virtual=included.htm --3. !--#include file=
included.html --I don't think the way you include has anything to do with standards.*What* you include does...that is, whatever you include will be renderedby the server when the page is requested, and delivered to the browser.
If the contents of your include are not valid, your page will not bevalid. And if you're a purist, you'll want to put the include call flushleft, and maintain your indents within the include file, so that the
generated code looks pretty too. :)As to which is more correct? It depends on the server. Apache prefersthe virtual setting, while file is more typical for IIS. Relative pathsaren't enabled in IIS6 by default for security reasons. Both are happy
to include things within an include (e.g. include the SSI directive forcurrent year next to the copyright symbol in a footer include) but IISrequires asp code to be included as an asp page, so that it is rendered
in the right order.As has been mentioned, in the right environment you could also use php'srequire or include.But I do agree with the previous poster...the included file isn't (orshouldn't be) an html file. It should be a text snippet of html with or
without other server directives. If you include an actual html filecomplete with header/body elements you'll definitely have problemsvalidating. Most people use .txt, .inc, .ssi, or .asp* as extensions for
these files.(*for IIS versions older than 6, because source code wouldbe shown in the browser if you typed in the include address, but not ifyou used .asp)SSI on Apache:
http://httpd.apache.org/docs/1.3/howto/ssi.html#whataressiSSI on IIS:http://en.wikibooks.org/wiki/Active_Server_Pages:Basic_ASP_Syntax
JonaWeb ServicesMEA**The discussion list forhttp://webstandardsgroup.org/ See 
http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list  getting help**


Re: [WSG] .htm include file into another .htm

2006-01-18 Thread Svip
Actually, the best way would be to use PHP, and besides, we do not
tend to call them HTM pages, but rather HTML pages. And thus the
filetype after its name is useless.

It could be done as following in PHP:

?php include('included.html');?

Which would not include your comment mark, and I do not know either
if your way is a standard, as I have never heard of it. Besides, I
hate frames, and thus would not suggest your way.

Note: When using PHP, you probably need to name your original file
with .php at the end.

Regards,
Svip, sviip.dk

On 18/01/06, KJ Callender [EMAIL PROTECTED] wrote:
 Hi,

 I want to include a file to be included into about 10 htm pages, and to
 save time me updating them individually, i want to use a include file.

 Using standards, which is the best way to achieve this:

 1.   !--#include virtual=/included.htm --

 2.   !--#include virtual=included.htm --

 3.   !--#include file=included.html --

 Any body have any experience of this?

 thanks,

 Jim




 --
 Kevin (Jim) Callender

 http://www.jayonline.co.uk/

 +44 (0)7888 701 588
 +44 (0)1273 818 546

 **
 The discussion list for  http://webstandardsgroup.org/

  See http://webstandardsgroup.org/mail/guidelines.cfm
  for some hints on posting to the list  getting help
 **


**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



Re: [WSG] .htm include file into another .htm

2006-01-18 Thread Lachlan Hunt

Svip wrote:

On 18/01/06, KJ Callender [EMAIL PROTECTED] wrote:

I want to include a file to be included into about 10 htm pages, and to
save time me updating them individually, i want to use a include file.

Using standards, which is the best way to achieve this:

1.   !--#include virtual=/included.htm --


It could be done as following in PHP:

?php include('included.html');?

Which would not include your comment mark, and I do not know either
if your way is a standard, as I have never heard of it. Besides, I
hate frames, and thus would not suggest your way.


They're called server side includes and they work on Apache.  They've 
got nothing to do with frames.  I don't believe they're in any official 
standard, Apache is the only server I know of that implements them like 
that (though, I don't know much at all about other servers).


http://httpd.apache.org/docs/2.0/howto/ssi.html

--
Lachlan Hunt
http://lachy.id.au/

**
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list  getting help
**



Re: [WSG] .htm include file into another .htm

2006-01-18 Thread Charlie Bartlett
They work fine on IIS in windows, as long as yourusing .shtml or .asp as yourfile extension.
As long as the code in the file you are calling is standards compliant,it doesn't make any difference how you call it. The browser will justtreat the code as if it were part of the calling page, just like any other html or any code generated on the server side.

Charlie

http://www.bartlettdesign.co.uk

On 1/18/06, Lachlan Hunt [EMAIL PROTECTED] wrote:
Svip wrote: On 18/01/06, KJ Callender [EMAIL PROTECTED] wrote:
 I want to include a file to be included into about 10 htm pages, and to save time me updating them individually, i want to use a include file. Using standards, which is the best way to achieve this:
 1. !--#include virtual=/included.htm -- It could be done as following in PHP: ?php include('included.html');? Which would not include your comment mark, and I do not know either
 if your way is a standard, as I have never heard of it. Besides, I hate frames, and thus would not suggest your way.They're called server side includes and they work on Apache.They'vegot nothing to do with frames.I don't believe they're in any official
standard, Apache is the only server I know of that implements them likethat (though, I don't know much at all about other servers).http://httpd.apache.org/docs/2.0/howto/ssi.html
--Lachlan Hunthttp://lachy.id.au/**The discussion list forhttp://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfmfor some hints on posting to the list  getting help**



RE: [WSG] .htm include file into another .htm

2006-01-18 Thread Patrick Lauke
 Svip

 Actually, the best way would be to use PHP,

If it's only a case of including a piece of static content inside another page, 
there's really no advantage in using PHP over simple server-side includes.

 and besides, we do not
 tend to call them HTM pages, but rather HTML pages.

Possibly just a question of preference?

 Which would not include your comment mark, and I do not know either
 if your way is a standard, as I have never heard of it. Besides, I
 hate frames, and thus would not suggest your way.

As Lachlan already mentioned, it's nothing to do with frames, but it's an 
Apache specific functionality.
More generally, it's not really important from a web standards point of view 
what happens server-side...only the final output which is sent to the user 
agent. i.e. you can use Perl scripts, SSIs, PHP, whatever...as long as the 
final HTML document that the browser displays adheres to markup/css standards.

 Note: When using PHP, you probably need to name your original file
 with .php at the end.

Depends on how the server is set up. You can even configure it to process .htm 
and .html files. On the same note, the default file extension for SSIs is 
.shtml, which again can be changed in the server's configuration.

P

Patrick H. Lauke
Web Editor / University of Salford
http://www.salford.ac.uk

Web Standards Project (WaSP) Accessibility Task Force
http://webstandards.org/

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



RE: [WSG] .htm include file into another .htm

2006-01-18 Thread Peter Firminger
This thread is really off topic so let's leave it here, but to correct 
something (sorry Lachlan)...

This works on IIS as well, as long as it's a .shtml or .shtm file to tell IIS 
to parse it for any required processing (like an include) before serving it 
(unless your host doesn't allow them). ICYDK: IIS is Microsoft's Internet 
Information Server.

I tested all three you mentioned and they all worked on my IIS server (Win2k).

1.   !--#include virtual=/included.htm --
2.   !--#include virtual=included.htm --
3.   !--#include file=included.html --

P

 They're called server side includes and they work on Apache.  They've
 got nothing to do with frames.  I don't believe they're in
 any official
 standard, Apache is the only server I know of that implements
 them like
 that (though, I don't know much at all about other servers).


**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**



RE: [WSG] .htm include file into another .htm

2006-01-18 Thread Jona Decker
You wrote:


Using standards, which is the best way to achieve this:

1.   !--#include virtual=/included.htm --

2.   !--#include virtual=included.htm --

3.   !--#include file=included.html --


I don't think the way you include has anything to do with standards.
*What* you include does...that is, whatever you include will be rendered
by the server when the page is requested, and delivered to the browser. 

If the contents of your include are not valid, your page will not be
valid. And if you're a purist, you'll want to put the include call flush
left, and maintain your indents within the include file, so that the
generated code looks pretty too. :)

As to which is more correct? It depends on the server. Apache prefers
the virtual setting, while file is more typical for IIS. Relative paths
aren't enabled in IIS6 by default for security reasons. Both are happy
to include things within an include (e.g. include the SSI directive for
current year next to the copyright symbol in a footer include) but IIS
requires asp code to be included as an asp page, so that it is rendered
in the right order.

As has been mentioned, in the right environment you could also use php's
require or include.

But I do agree with the previous poster...the included file isn't (or
shouldn't be) an html file. It should be a text snippet of html with or
without other server directives. If you include an actual html file
complete with header/body elements you'll definitely have problems
validating. Most people use .txt, .inc, .ssi, or .asp* as extensions for
these files.  (*for IIS versions older than 6, because source code would
be shown in the browser if you typed in the include address, but not if
you used .asp)

SSI on Apache:
http://httpd.apache.org/docs/1.3/howto/ssi.html#whataressi

SSI on IIS:
http://en.wikibooks.org/wiki/Active_Server_Pages:Basic_ASP_Syntax

Jona
Web Services
MEA
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list  getting help
**