Forum Moderators: open
I can't get an include to work! I am trying to get away from using shared borders, so I can have more flexibility with my site, so I decided to use includes. The weird part is, when I do this through Frontpage, the page shows correctly through the preview, but does not show correctly in Internet Explorer and Firefox. Here is the code Frontpage Generated for me:
<!--webbot bot="Include" U-Include="http://www.example.com/borders/top-border.html" TAG="BODY" -->
Works great in the preview. But doesn't work in browser. Please help! Thank you.
"your domain name is not resolving to the new host yet, after its done that I believe things should work correctly."
But I am able to publish pages with frontpage, and the changes reflect on internet explorer and firefox immediately, so doesn't this mean my domain name is resolved? The domain doesn't say "does not exist" when I type it into the address bar.
So from his response, the server can handle SSI.
It is not usual for an FP include to contain the full ERL to the included page - generally it would look more like this:
<!--webbot bot="Include" U-Include="borders/top-border.html.htm" TAG="BODY" startspan -->
I don't think it will work with the full url.
Did you edit that by hand or was that the way FP wrote it?
I tried php includes (I found the information within this site) but they are not working either. Maybe my domain is not resolved yet....even though I can connect to the site with frontpage, and upload, and everything. I don't know, I'm lost.
If it is .htm or .html, that is most likely the problem.
Not with a FrontPage include - either extension is not only fine in that case but is correct, for both the included pages and the pages in which they are included.
If your site is appearing at the URL, then the domain is resolved, so that is not the issue.
I think editing the include statement by hand may be the problem. Try the following:
Start over, and this time do NOT edit it AT ALL. You should NEVER need to edit an FP include statement by hand. When on your local machine it may look incorrect, but once you publish, provided you do not edit it, all should be sorted out.
Include the page by browsing to it and selecting it, not by entering it manually.
Make sure that the include page is a full HTML page - that is that it includes the <head></head> section and opening and closing <body> tags. In the case of both SSI and PHP includes these would not be in the include page, but they should be for an FP include - only what is between the <body> and </body> tags will be included.
FP includes normally function very efficiently, but you do need to avoid editing the code FP inserts for any components unless you are absolutely certain you know what you are doing - they work fine even if they look weird!
Make sure that the include page is a full HTML page - that is that it includes the <head></head> section and opening and closing <body> tags. In the case of both SSI and PHP includes these would not be in the include page, but they should be for an FP include - only what is between the <body> and </body> tags will be included.
Oh my god, that was the solution. I forgot a body tag in the include html. Sometimes there really is just a simple solution. Here I was thinking it had something to do with my server. Well thank you for suggesting to me the possibility, becuase I probably would not have ever thought to check it out until you mentioned it. Phew, thanks, now I can start building my site!