Solved

Can someone explain FP "include" files in detail to me?

Posted on 2001-08-22
8
176 Views
Last Modified: 2013-12-24
I come from programming in ColdFusion where an include is does nothing more than include the file as pure text and nothing more.  I had a file that has some javascript in the page and some calls to external javascript files.  I wanted to break out the header and the footer and use them as includes and then just edit the content in between.

So I broke out my header file with the start html tag, the head tags, the start body tag and the calls to the two external javascript files.

Then my footer file has the ending body and html tags with my footer images.

Now my final page looks like this.
<!--webbot bot="Include" U-Include="header.htm" TAG="BODY" -->
Content goes here
<!--webbot bot="Include" U-Include="footer.htm" TAG="BODY" -->

Bottom line is that it worked when it was one file but the javascrip fails when it is broken out like I did.
0
Comment
Question by:Soulive
8 Comments
 
LVL 7

Accepted Solution

by:
ClassyLinks earned 50 total points
ID: 6413675
When you run the page in a browser and look at the code what do you see?

What I think you will find is that you now have 2 sets of <head> tags.

FP is really a PITA about shoving that head info onto the page.  It doesn't read the content of your "included files" and just assumes that it needs to add the head tags etc.  No way around this I'm afraid.  I don't even think that editing the "host" page in notepad would do any good.  But I could be wrong there.

The better way to include your files is not by using the bot.

With ASP pages, I do it this way.

<!--#include file="header.htm"-->
Content goes here
<!--#include file="footer.htm"-->


HTH
0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6453211
Soulive....did this information help?
0
 
LVL 1

Author Comment

by:Soulive
ID: 6453755
I was sort of waiting for the technical explanation of what FP does.  That's why I priced it out at 100pts.  Your suggestion did help me but it didn't completely solve my problem.  Is there a way to give you partial points?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6453792
Sure...post a 0 point question in Community Support.  A moderator will stop by and reduce the points then you can accept the answer.

However, what kind of technical explanation are you looking for?  A work around?  There really isn't a pure FP work around.

The problem is that FP puts that head info in each page you open with the editor....the only way to avoid it that I know of is to work in pure HTML mode.
0
 

Expert Comment

by:ComTech
ID: 6453863
As reuqested by the author of the question, the points were lowered by 50%.

ComTech
Community Support
0
 
LVL 2

Expert Comment

by:Lunchy
ID: 6453872
Hi Classy,

Soulive has requested a point reduction to 50 in order to award you partial points on this question.  Sound fair to you?
0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6453893
Holy jumping...you guys are fast!

Yes, it's ok with me, as I posted the suggestion. ;-)

You're so fast that I didn't get a chance to see exactly what soulive wanted.  Oh well....Soulive, if you still want more info, I can try to provide it for you, even though this question is now closed.

Just a hint for future reference though.....EE works best when there is ongoing conversation between the questioner and the Experts.  Had you mentioned that my suggestion was not exactly what you were looking for in the beginning, it likely wouldn't have gone so long without a satisfactory answer for you.


Cheers!
0
 

Expert Comment

by:ComTech
ID: 6454078
Hi Lunchy, pretty good service I'd say.  :-)

Thanks ClassyLinks

ComTech
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What is the normal amount of queries 5 78
Technology stack suggestions 4 64
character entities and entity references in XML 17 123
installing and using WTP plugin eclipse MARS 3 117
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question