can't view web page if #include used

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
lucieh
Posts: 1
Joined: Wed Apr 12, 2006 8:47 pm

can't view web page if #include used

Post by lucieh »

I'm very new to all of this, so please bear with me if I don't have the proper terminology down.

I'm using TextPad to edit my web pages (which were created for me by a professional designer). There are three #include lines at the beginning of the web page I'm editing. It appears as if the #include is commented out. There are <!-- and --> on each of these lines.

When I make my changes and select the "globe" icon -- meaning that I want to view the changes in my browser, the browser comes up but it only redisplays the HTML code... not the "real view".

So, are the #includes causing the problem or are the comments causing the problem?

I temporarily removed these three lines and the web page displayed correctly.

I'm afraid to remove this code --- I know, I know I need to talk with my designer... but in the meantime, how do I display the web page with these three lines in it.

Does something else need to be the first line on the page?
Thanks!
Lucie
ninjalabs
Posts: 46
Joined: Tue Jan 25, 2005 4:38 pm

Post by ninjalabs »

The <!--#include ... --> section is a "server side include". This basically replaces a part of the HTML document with another one (allowing easy implementation of templates etc).

You need to use a web server to display these files in their complete form as the #include directive is processed on the server. Textpad or any browser using it will not be able to render it.
TextPad redneck since 1999.
NinjaLabs is now CSWD Limited!
Post Reply