Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with error

Status
Not open for further replies.

ncscott

MIS
Jan 10, 2003
36
US
I'm relatively new to ASP programming. I have a user login page that is throwing an error to the browser which reads,

Microsoft VBScript compilation error '800a03f6'

Expected 'End'

/*******.asp, line 83

This error is being thrown on page load, as opposed to when one of the buttons is clicked to execute the VBscript control code.

Line 83 looks like this:

<TD CLASS=ListHeader ALIGN=LEFT WIDTH=100% HEIGHT=25><% = UCASE(sHeaderTitle) %></TD>

The surrounding table rows <TR> and table <TABLE> are all properly closed, and in the VBscript code further up the page, all if statements are properly ended. I'm puzzled as to what 'End' could be missing?
 
is there really a space between the = and the value?
<% = UCASE(sHeaderTitle) %>
is incorrect and should be
<%=UCASE(sHeaderTitle)%>

____________________________________________________
The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-2924

onpnt2.gif
 
No, that's not it. I have another page which has the exact same line in it and that page works fine. Just for grins, I took the spaces out and it had no effect.
 
hmm.. well you should not have spaces but anyhow,
there is some small syntax error somewhere causing it and I think your best solution is to start debugging the script.

btw: always use &quot; &quot; around your HTML tag parameters
<TD CLASS=&quot;ListHeader&quot; ALIGN=&quot;LEFT&quot; WIDTH=&quot;100%&quot; HEIGHT=&quot;25&quot;><%=UCASE(sHeaderTitle)%></TD>



____________________________________________________
The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-2924

onpnt2.gif
 
I would start here as the error indicates a problem with this value UCASE(sHeaderTitle)

possibly where the var is declared and given value


____________________________________________________
The most important part of your thread is the subject line.
Make it clear and about the topic so we can find it later for reference. Please!! faq333-2924

onpnt2.gif
 
Expected End is typiclly the result of forgetting an end if, or an end function, Now, one fly in the ointment here... i have had specific instances where i have a multicase IF statement, that has ALOT of code betwwen the segments, and has caused the ASP to fail because it doesn't seen to find an 'end', which there was, justt too much code inbetween...

easiest thing to do is seatch for the word IF and double check you have an even number ( opens/closes ) if you dont doublecheck for multicase conditionals (elseif) those will offset the counts, and search for SUB and FUNCTION make sure everything has gotten closed out, if that is the case and say you have more than 2 pages of code between a start and end if, try relocating the bulk of it out to a function call.

 
and side note, the line returned on the 'expected end' never matches where it should be when it's the case of unclosed conditionals, and if your page has include files, those i would check first, cause they're normally the most overlooked.
 
Drexor, you are correct. You win the prize. I actually found the problem yesterday a little while after I posted. Just a stupid case of me forgetting what language I was programming in, and that &quot;else if&quot; is one word in VBScript. Hence, an else if earlier on in the code was being read as an &quot;else&quot; and then a new &quot;if&quot; with no end to the first statement. It always turns out to be something stupid.

Thanks for your help everybody.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top