Solved

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

Posted on 2001-08-22
8
175 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
 
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
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.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
recommended CMS for the website revamp 3 92
How to analyze web traffic logs 10 100
javascript to html map 8 61
.php tree directory? 5 54
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…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

930 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now