Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-25-2004, 12:51 PM   PM User | #1
jimmyb
New to the CF scene

 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
jimmyb is an unknown quantity at this point
page loads in IE, but download box opens in Mozilla

Hello all,

First posting for me on here.

I am very new to asp and looking for the answer to a problem. A friend's host has just enabled .asp support for him. When I load the following page in Internet Explorer, it works fine, but in Mozilla a download dialog box opens up:

http://www.campuslivingcentres.com/student/default.asp

The page has this include tag thrid line from the top:
Code:
<!-- #include file="include/inc_header.asp"-->
Here is the page:
Code:
<html>
<head>
<!-- #include file="include/inc_header.asp"-->
<title>Campus Living</title>
<link rel="stylesheet" href="include/style.css">
<script language="JavaScript" src="include/inc_javascript.asp"></script>
<script language="JavaScript" src="include/inc_menu.asp"></script>
<script language="JavaScript1.2" src="include/menu.js"></script>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<script language="JavaScript1.2">fwLoadMenus();</script>
<!-- #include file="include/top_nav.asp"-->
<table border="0" cellpadding="0" cellspacing="0" width="760" style="border-collapse: collapse" bordercolor="#111111">
  <tr>
   <td>
   <img name="n02a_college_template_r1_c1" src="images/02a_college_template_r1_c1.jpg" border="0"></td>
   <td>
   <img name="n02a_college_template_r1_c2" src="images/02a_college_template_r1_c2.jpg" border="0"></td>
  </tr>
  <tr>
   <td bgcolor="#006699" valign="top" background="images/02a_college_template_r8_c1.jpg">
   <img name="n02a_college_template_r2_c1" src="images/02a_college_template_r2_c1.jpg" border="0"><br>
   <a onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('n02a_college_template_r3_c1','','images/02a_college_template_r3_c1_f2.jpg',1);" href="default.asp">
   <img name="n02a_college_template_r3_c1" src="images/02a_college_template_r3_c1.jpg" border="0"></a><br>
   <a onMouseOut="MM_swapImgRestore();FW_startTimeout();" onMouseOver="window.FW_showMenu(window.fw_menu_0,205,191);MM_swapImage('n02a_college_template_r4_c1','','images/02a_college_template_r4_c1_f2.jpg',1);" href="residents.asp">
   <img name="n02a_college_template_r4_c1" src="images/02a_college_template_r4_c1.jpg" border="0"></a><br>
   <a onMouseOut="MM_swapImgRestore();FW_startTimeout();" onMouseOver="window.FW_showMenu(window.fw_menu_1,205,211);MM_swapImage('n02a_college_template_r5_c1','','images/02a_college_template_r5_c1_f2.jpg',1);" href="life.asp">
   <img name="n02a_college_template_r5_c1" src="images/02a_college_template_r5_c1.jpg" border="0"></a><br>
   <a onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('n02a_college_template_r6_c1','','images/02a_college_template_r6_c1_f2.jpg',1);" href="location.asp">
   <img name="n02a_college_template_r6_c1" src="images/02a_college_template_r6_c1.jpg" border="0"></a><br>
   <a onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('n02a_college_template_r7_c1','','images/02a_college_template_r7_c1_f2.jpg',1);" href="alumni.asp">
   <img name="n02a_college_template_r7_c1" src="images/02a_college_template_r7_c1.jpg" border="0"></a><br>
   <img name="n02a_college_template_r8_c1" src="images/02a_college_template_r8_c1.jpg" border="0"><br>
<!-- #include file="include/inc_student_housing_link.asp"-->
   </td>
   <td rowspan="2" valign="top" background="images/02a_college_template_r2_c2.jpg">
   <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="516" id="AutoNumber4">
     <tr>
       <td width="34">&nbsp;</td>
       <td width="482">&nbsp;</td>
     </tr>
     <tr>
       <td width="34">&nbsp;</td>
       <td width="482">
       <h1>Welcome</h1>
       </td>
     </tr>
     <tr>
       <td width="34">&nbsp;</td>
       <td width="482">
       ***********content removed***************
       <p>&nbsp;</td>
     </tr>
   </table>
   </td>
  </tr>
  <tr>
   <td valign="bottom" bgcolor="#006699" background="images/02a_college_template_r8_c1.jpg">
   <img name="n02a_college_template_r10_c1" src="images/02a_college_template_r10_c1.jpg" border="0"></td>
  </tr>
</table>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="760" id="AutoNumber2">
    <tr>
      <td>
      <img name="n02a_college_template_r11_c1" src="images/02a_college_template_r11_c1.jpg" border="0"></td>
    </tr>
  </table>
   
</body>
</html>
Any idea what could be causing this?

Thanks everyone!!!

JimmyB

Last edited by jimmyb; 08-25-2004 at 01:02 PM..
jimmyb is offline   Reply With Quote
Old 08-25-2004, 12:57 PM   PM User | #2
jimmyb
New to the CF scene

 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
jimmyb is an unknown quantity at this point
I thought I found the answer, turned out to be wrong...

Last edited by jimmyb; 08-25-2004 at 01:04 PM..
jimmyb is offline   Reply With Quote
Old 08-25-2004, 01:21 PM   PM User | #3
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
First off the line

<!-- #include file="include/inc_header.asp"-->

should be in the body tag....

I do not have mozilla on this machine, or I would test it out...

Eric
__________________
Tech Author [Ajax In Action, JavaScript: Visual Blueprint]
A1ien51 is offline   Reply With Quote
Old 08-25-2004, 02:45 PM   PM User | #4
jimmyb
New to the CF scene

 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
jimmyb is an unknown quantity at this point
So you cannot have include tags outside of the body tag?!

How come it works in IE then?
jimmyb is offline   Reply With Quote
Old 08-25-2004, 02:50 PM   PM User | #5
BuddhaMan
New Coder

 
Join Date: Aug 2004
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
BuddhaMan is an unknown quantity at this point
Whatever you did at the time of this post, the situation is now reversed. IE tries to download the default.asp file and Firefox opens the page up.
BuddhaMan is offline   Reply With Quote
Old 08-25-2004, 02:59 PM   PM User | #6
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
I am assuming that the <!-- #include file="include/inc_header.asp"--> is the header image and not information to be placed in the header.

If I am correct then you need to keep the body content in the body tags.

If the content in the include belongs in the header tag then it remains.

Eric
__________________
Tech Author [Ajax In Action, JavaScript: Visual Blueprint]
A1ien51 is offline   Reply With Quote
Old 08-25-2004, 03:27 PM   PM User | #7
jimmyb
New to the CF scene

 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
jimmyb is an unknown quantity at this point
Think I may have the answer...

I renamed the .asp file in the include tag to .inc and that seems to be working, but someone else may be working on the site, too:

<!-- #include file="include/inc_header.asp"-->

to

<!-- #include file="include/inc_header.inc"-->

Are .asp extensions allowed in include tags?
jimmyb is offline   Reply With Quote
Old 08-25-2004, 03:31 PM   PM User | #8
jimmyb
New to the CF scene

 
Join Date: Aug 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
jimmyb is an unknown quantity at this point
Still not working, may be proxy, I have cleared cache and put a ? at the end of the link...
jimmyb is offline   Reply With Quote
Old 08-26-2004, 02:07 PM   PM User | #9
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
Quote:
Originally Posted by jimmyb
Think I may have the answer...

I renamed the .asp file in the include tag to .inc and that seems to be working, but someone else may be working on the site, too:

<!-- #include file="include/inc_header.asp"-->

to

<!-- #include file="include/inc_header.inc"-->

Are .asp extensions allowed in include tags?
Actually, it's recommended to use .asp in include files not .inc
If the user happens to know the filename of .inc and types it in the browser, the file can be downloaded. See this article for more info of this topic.

I noticed that you have HTML comments <!-- --> inside the external js named "inc_javascript.asp". There should be no HTML comments in an external js.

As for the include file not working, I tested it in Firefox and the default.asp displayes but the includes don't work. In IE, the default.asp itself is asked to be downloaded. The problem seems to be in the IIS in Application Mappings section. The extension .asp might have been deleted in the Application Mappings list. Probably, it partially works for Firefox because the page was sent as text/html. Actually there are no asp codes in default.asp, only include files that have .asp extension.
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app
glenngv is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:49 AM.


Advertisement
Log in to turn off these ads.