By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,162 Members | 1,050 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,162 IT Pros & Developers. It's quick & easy.

Why is ASP include function not working for subfolders?

P: 2
While most of our website is located in the first level, we do have a couple of sub directories for files. One is the "includes" directory which hosts our sidebar and header information that is on every page.

We also have two directories, one for educational pages and the other for our video tutorials. I am having some issues with getting these pages (education & tutorial) to correctly refer to the files in the "include" folder. I am using the virtual command, which refers from the top directory, right?

Page in top directory:
http://www.apogeerockets.com/Rocketry_Video_tips.asp

Page in "Rocketry_Videos" directory:
http://www.apogeerockets.com/Rocketr...y_Video_01.asp

As you can see, the menu is weird and not rendering correctly. I also have issues with the video testimonials at the bottom as well. I had to put the video code in each sub-directory as it would cause an error if i tried to refer to it in the "includes" directory from the "Rocketry_Videos directory. Amazingly, I have not had issues with the sidebar (yet).

"Include" code snippets below.

Header has an "include" for the menu itself:
Expand|Select|Wrap|Line Numbers
  1. <td><!--#include file="header_menu.asp" --></td>
Page includes header:
Expand|Select|Wrap|Line Numbers
  1. <tr>
  2.     <td colspan="2"><!--#include virtual="../includes/header.asp" --></td>
  3.   </tr>  
Example file structure:
Top Directory/
>Rocketry_Video_tips.asp
>includes/
>>header.asp
>>header_menu.asp
>Rocketry_Videos/
>>Rocketry_Video_01.asp

any tips help. if i need to post more code, let me know.
Jan 31 '11 #1
Share this Question
Share on Google+
1 Reply


P: 2
ugh. turns out it wasn't an ASP issue at all, but javascript.
Feb 1 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.