Solved

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

Posted on 2001-08-22
8
174 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

747 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

13 Experts available now in Live!

Get 1:1 Help Now