Includes, CSS and ASP (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


slbergh -> Includes, CSS and ASP (6/1/2004 14:18:33)

I have a site where I have a box for announcements appearing on all my pages. The majority of the pages are .asp. All of the pages are pulling all of their formatting and layout information from one style sheet. When I manually enter the information for the announcements onto each page, it displays perfectly. When I try to put the same information in using an include file, the announcement box goes blank and won't pull the information. Does anyone have any ideas why this is?

See the problem here




Giomanach -> RE: Includes, CSS and ASP (6/1/2004 14:47:15)

Can I see the coding for your Includes?

Dan




slbergh -> RE: Includes, CSS and ASP (6/1/2004 14:50:52)

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title></title>
</head>

<body>

<p id="title">50<sup>th</font></sup> Anniversary CSHEMA 
    Conference - Chicago, IL -  July 4-7, 2004<br>
    <br>
    22<sup>nd</font></sup> Annual College and University 
    Hazardous Waste Conference - Roanoke, VA - August 8-10, 2004</div></p>

</body>

</html>




Giomanach -> RE: Includes, CSS and ASP (6/1/2004 14:55:34)

Remove the coding from <html> to <body> and the last </body> and </html>

Should work then

Dan




bobby -> RE: Includes, CSS and ASP (6/1/2004 15:00:41)

It looks like you're using Front Page component includes... they dont work on ASP pages... you'll have to change to SSI (Server Side Includes)

It works the same way, but as G mentioned above, you'll have to remove everything but EXACTLY what should appear in the include (ditch the <html>, <head> and <body>)

Then use this format for the include command:

<!--#include file="filename.txt" -->

The include can be a .txt, .inc, .html, .htm, etc... doesn't matter.

The server will parse the include before sending the data to your browser... like a copy > paste at the server level... you'll never be able to tell there was an include there.




slbergh -> RE: Includes, CSS and ASP (6/1/2004 15:01:29)

For some reason it didn't.




Spooky -> RE: Includes, CSS and ASP (6/1/2004 15:27:47)

Its not an asp page - it wont do SSI




bobby -> RE: Includes, CSS and ASP (6/1/2004 15:59:15)

quote:

Its not an asp page - it wont do SSI
... not necessarily... that depends on your host and server...

Sorry for misunderstanding the posts above... for some reason I thought you were on an ASP page. If you're not using ASP and you want to use SSI, then you have to use a .shtm or .shtml extension.

Actually, check with your host... many times you can ask them to set up your account to parse for includes on .htm and .html pages. It depends on them whether they'll do it or not.

If you're on a Unix or Linux server, you can tell it which page extensions to parse... Google for ".htaccess" and you'll probably find all you need to set that up.

Now, back to the original problem... you can't get FP component includes to work on an .htm page?

Try changing announce.txt to a .htm file... I don't think FP includes will work with a .txt file.




slbergh -> RE: Includes, CSS and ASP (6/1/2004 16:05:36)

It doesn't seem to matter what I try, I can't get announce.htm to display on my page, regardless of whether it's an htm or asp page. The odd part is, the include that I'm using for my menu displays just fine! And the include shows up in Preview.

The server hosting it is an IIS box, without FPSEs installed (our IT guys have locked down the box because of security concerns).




BeTheBall -> RE: Includes, CSS and ASP (6/1/2004 16:09:16)

Bobby is correct. It appears your include file is announce.txt. The FP include component will not display the include unless you change it to announce.htm. This is true whether you the page on which you are displaying the include is .asp or .htm. Your menu is menu2.htm, which is why it shows just fine.




slbergh -> RE: Includes, CSS and ASP (6/1/2004 16:42:49)

Hmm, on this end, it's been changed back to an htm...and it still doesn't display.

<div id="announce">
   <p id="title"> 
	<!--webbot bot="Include" U-Include="announce.htm" TAG="BODY" --></p></div>
  <div id="sidebar-a">
    <!--webbot bot="Include" U-Include="menu2.htm" TAG="BODY" --></div>
  <div id="content">




BeTheBall -> RE: Includes, CSS and ASP (6/1/2004 16:52:09)

Contrary to what was said earlier in the thread, I think you need to keep the <html> and <body> tags in the document. For example, I pasted the code just above into a page and tried to include it, but nothing appeared. I saved your first piece of code (shown below) as include.htm and it displayed as it should.

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title></title>
</head>

<body>

<p id="title">50<sup>th</font></sup> Anniversary CSHEMA 
    Conference - Chicago, IL -  July 4-7, 2004<br>
    <br>
    22<sup>nd</font></sup> Annual College and University 
    Hazardous Waste Conference - Roanoke, VA - August 8-10, 2004</div></p>

</body>

</html>




slbergh -> RE: Includes, CSS and ASP (6/1/2004 16:57:51)

It did display this time, but now, it's completely thrown off the layout! [:@]




slbergh -> RE: Includes, CSS and ASP (6/1/2004 16:59:06)

Never mind...I had an extra div in there. It appears everything is working (and looking) just as it should.

Thanks for your help, everyone!!




BeTheBall -> RE: Includes, CSS and ASP (6/1/2004 17:09:41)

Beautiful! Love the logo.




slbergh -> RE: Includes, CSS and ASP (6/1/2004 17:12:50)

Thanks!




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125