DotDragnet
May 23, 2012, 03:08:12 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: follow us on twitter @dotdragnet
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Changing an include file  (Read 2872 times)
Bob
Newbie
*
Posts: 10



View Profile Awards
« on: August 12, 2008, 09:54:55 AM »

Hello again.........

I have a couple of sites on SBI and the include protocol there (for example) is ***navigation.shtml***

I am now trying to use the same/similar file on a different site, on an ASP server so renamed the file navigation.html and on the html page put <!--#include virtual="navigation.html"-->

While this works on a Dreamweaver preview, it doesn't do anything when uploaded onto the server.

What have I got wrong please?

Kind regards,

Bob
Logged
Bob
Newbie
*
Posts: 10



View Profile Awards
« Reply #1 on: August 12, 2008, 10:08:52 AM »

Or just thinking aloud, do I need to wait for the server to refresh?

Thanks

Bob
Logged
Rosco
Global Moderator
Hero Member
*****
Posts: 917



View Profile Awards
« Reply #2 on: August 12, 2008, 02:44:59 PM »

what is the name of the file that calls the include?

well, more importantly, the file extension of the file that calls the include... if its a .asp file then make sure the include statement is outside any <% %> tags
Logged
Bob
Newbie
*
Posts: 10



View Profile Awards
« Reply #3 on: August 12, 2008, 02:57:12 PM »

what is the name of the file that calls the include?

well, more importantly, the file extension of the file that calls the include... if its a .asp file then make sure the include statement is outside any <% %> tags

That's a bit technical for me Rosco!  It's a basic html page.  The include file is a block of navigation links and I have tried renaming it as .asp, html, shtml, all of which display perfectly in preview mode but not live on the server.

Only the site's primary index page is .asp   All other page files are htm.  I have this problem page together with its navigation include file in a separate folder.

Don't know if that helps Sad

Bob
Logged
keri
Sr. Member
****
Posts: 491



View Profile WWW Awards
« Reply #4 on: August 12, 2008, 06:10:40 PM »

doesn't the parent page have to be .shtml or .asp in order to include files within it ?
Logged

Keri
Bob
Newbie
*
Posts: 10



View Profile Awards
« Reply #5 on: August 12, 2008, 06:30:18 PM »

doesn't the parent page have to be .shtml or .asp in order to include files within it ?

Thanks Keri,

I have tried re-naming the page as an .asp file but that just generates a 500 server error.

Bob
Logged
Granty
Hero Member
*****
Posts: 508



grantyh
View Profile Awards
« Reply #6 on: August 13, 2008, 12:10:31 AM »

.aspx maybe? Failing that, link us up. smile
Logged
MattC
Hero Member
*****
Posts: 825



mattc_stfc
View Profile WWW Awards
« Reply #7 on: August 13, 2008, 08:41:53 AM »

Let us see the source code you are using please.
Logged

Bob
Newbie
*
Posts: 10



View Profile Awards
« Reply #8 on: August 13, 2008, 09:55:41 AM »

.aspx maybe? Failing that, link us up. smile

Thanks Guys,

I thought it might be helpful if I explained in more detail, just what I am trying to do.

I have an Over 50's site <www.Age-Net.co.uk> It runs on a Windows asp server so the Home page is index.asp  All other pages are 'www.root/folder/name.htm'.  The site is large enough to be to be time consuming and I need to make it more easily manageable.

I need to migrate the site across to a new template and use includes for the navigation bars, footer and possibly also the advertising blocks - Adsense etc.  This is going to take weeks rather than days.............

First though, I want to introduce a new section to maintain reader interest.

So, I have opened a new section folder, wwwroot/new_sub_section/ which contains new template, CSS & image files and a new index page with four linked sub pages.  It also contains includes for navigation and footer files.  The sub index page displays the includes perfectly when viewed in Dreamweaver but when up-loaded to the server, they no longer show.

I tried .aspx for the sub index page Granty.  This works on the single page when uploaded to the server, but not for the other four pages I have it linked to.  Changing them to .asp or .aspx just generates a 500 error.

Obviously, I am confused!  Seems it might be more efficient to just re-do the Home page with the includes and then work through each section of the site.  I will keep you posted.

Thanks all.....

Bob

If my explanation is unclear  Sad at the very foot of www.age-net.co.uk Home page there is a 'developer's link' showing the draft new section I am trying to introduce.
 
Bob
« Last Edit: August 13, 2008, 09:58:48 AM by Bob » Logged
MattC
Hero Member
*****
Posts: 825



mattc_stfc
View Profile WWW Awards
« Reply #9 on: August 13, 2008, 10:16:30 AM »

Well the server is defiantly running Windows Server 2003 - Microsoft-IIS/6.0

Can we see the source code that is giving you the Server 500 error and do you have the error message details?


Matt
Logged

Bob
Newbie
*
Posts: 10



View Profile Awards
« Reply #10 on: August 13, 2008, 10:39:18 AM »

Sorry for the waste of your time Guys.  I have decided that while it looked like a good short term solution, all I am doing is digging an ever deeper hole  no

So, I will re-build the Home page with the includes and then add the rest of the site, section by section.

Kind regards,

Bob
Logged
MattC
Hero Member
*****
Posts: 825



mattc_stfc
View Profile WWW Awards
« Reply #11 on: August 13, 2008, 08:20:11 PM »

Sorry for the waste of your time Guys.  I have decided that while it looked like a good short term solution, all I am doing is digging an ever deeper hole  no

So, I will re-build the Home page with the includes and then add the rest of the site, section by section.

Kind regards,

Bob

Its not a waste of our time. Here to help.
Logged

Bob
Newbie
*
Posts: 10



View Profile Awards
« Reply #12 on: August 13, 2008, 09:10:29 PM »

Sorry for the waste of your time Guys.  I have decided that while it looked like a good short term solution, all I am doing is digging an ever deeper hole  no

So, I will re-build the Home page with the includes and then add the rest of the site, section by section.

Kind regards,

Bob

Its not a waste of our time. Here to help.

Appreciate that Matt - Making the decision to go back to basics was the right one, I have the index page live with the includes working, so it only requires the migration of another couple of thousand pages.  I might just start pruning some of the old stuff out big grin!

Kind regards,

Bob
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2008, Simple Machines Valid XHTML 1.0! Valid CSS!