Please look at my code..PLEASE (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


51 -> Please look at my code..PLEASE (8/28/2003 11:16:35)

I have this nice error, please someone give me some good advice on what is wrong with this small problem. Thank you. here is the error i get ...
Microsoft VBScript compilation error '800a03ea'

Syntax error

/ALD/bugs/html/scripts/header.inc, line 88

Else
^
now here is all the code in the page.

<CENTER>

<TABLE WIDTH=100% BORDER=0>



<% REM// This table contains the BUG and Project logos as well
REM// as a banner text%>

<TR WIDTH=100% ALIGN=CENTER>


<% REM// Spacer Column %>

<TD WIDTH=10 ROWSPAN=2>



</TD>


<% REM// Bugs Online Logo %>

<TD ALIGN=LEFT WIDTH=70 HEIGHT=70 ROWSPAN=2>
<IMG BORDER=0 SRC="images/projects/bugs.gif" BORDER="0" NAME="Bugs_Online" ALT="click here to exit to login screen..." HEIGHT=70 WIDTH=70><BR>
<A HREF="index.asp">
<FONT FACE="Verdana, Arial" SIZE=0><LEFT><IMG SRC='./images/reports/space.gif' HEIGHT=1 WIDTH=11 ALIGN=BOTTOM BORDER=0>[Logoff]</LEFT></FONT>
</A>

</TD>

<TD>


<%
'Announcement appears here...


If iBug_Type = 15 Then
%>


<!-- #include file="show_news.inc" -->


<%
Else

response.write " "

End If
%>


</TD>


<% REM// Project Logo %>

<TD ALIGN=RIGHT WIDTH=70 HEIGHT=70 ROWSPAN=2>


<%
REM// Determine rather or not image
REM// exists for this project

If request("lstProject") = "" or request("lstProject") = "No Criteria" Then


On Error resume next
set objText = createobject("Scripting.FileSystemObject")
set objImage = objText.OpenTextFile(request.ServerVariables("APPL_PHYSICAL_PATH") & "\images\projects\" & session("sProject") & ".gif", , True)
sImage = objImage.ReadAll
objImage.close
objText.close

If imgTitle1 <> "" Then
imgMessage = ": " & session("sProject")
imgTitle1 = session("sProject")
Else
imgMessage = ": Management"
imgTitle1 = "management"
End If

Else


On Error resume next
set objText = createobject("Scripting.FileSystemObject")
set objImage = objText.OpenTextFile(request.ServerVariables("APPL_PHYSICAL_PATH") & "\images\projects\" & request("lstProject") & ".gif", , True)
imgTitle1 = objImage.ReadAll
objImage.close
objText.close

If imgTitle1 <> "" Then
imgMessage = ": " & request("lstProject")
imgTitle1 = request("lstProject")
Else
imgTitle1 = "management"
End If

End If


'Bugs Online Image
If imgTitle1 = "Bugs Online" Then imgTitle1 = "bugs"

%>

<IMG BORDER=0 SRC="images/projects/<% = imgTitle1 %>.gif" BORDER="0" ALT="<% = "Bugs Online Project" & imgMessage %>" HEIGHT=70 WIDTH=70><BR>
<A HREF='#' onClick='javascript: window.history.back ()'>
<FONT FACE="Verdana, Arial" SIZE=0><RIGHT>[<-Back]<IMG SRC='./images/reports/space.gif' HEIGHT=1 WIDTH=11 ALIGN=BOTTOM BORDER=0></RIGHT></FONT>
</A>

</TD>


<TD WIDTH=10 ROWSPAN=3>



</TD>


</TR>


<% REM// Page Banner %>

<TR HEIGHT=35 VALIGN=BOTTOM WIDTH=100% ALIGN=CENTER>


<TD ALIGN=CENTER>
<B><FONT FACE="Verdana, Arial" COLOR="#000000" SIZE=2>


<% If imgTitle <> "" Then %>

<IMG SRC="images/banners/<% = imgTitle %>.gif" BORDER="0" NAME="Bugs_Online" ALT="" ALIGN="absmiddle">

<% End If %>


<%=sMessage %>

</FONT></I></B>
</TD>

</TR>


</TABLE>

</CENTER>

Thank you so much for your time




bobby -> RE: Please look at my code..PLEASE (8/28/2003 11:59:22)

this is the first thing that jumped out at me:

quote:


If iBug_Type = 15 Then
%>


<!-- #include file="show_news.inc" -->


<%
Else

You can't dynamically include a page this way... the include gets parsed first, then the ASP... so by the time you get to your "if, then..." statement, the include is already there... its a timing issue with the server.

(there also shouldn't be a space between the <!-- and # but that might be a side issue)

That may be causing the problem... but it will depend on whats in that page ;)

can you be more specific about which line is #88 ?


... hope it helps [:D]




51 -> RE: Please look at my code..PLEASE (8/28/2003 14:01:44)

Thank you, that information is a good start.
Here is line 88.

On Error resume next
set objText = createobject("Scripting.FileSystemObject")
set objImage = objText.OpenTextFile(request.ServerVariables("APPL_PHYSICAL_PATH") & "\images\projects\" & request("lstProject") & ".gif", , True)
imgTitle1 = objImage.ReadAll
objImage.close
objText.close

If imgTitle1 <> "" Then
imgMessage = ": " & request("lstProject")
imgTitle1 = request("lstProject")
Else
imgTitle1 = "management"
End If

End If

Thank you again




Spooky -> RE: Please look at my code..PLEASE (8/28/2003 14:13:07)

Try removing the on error statements




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625