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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with "expecting end of statement"

Status
Not open for further replies.

larschla

Programmer
Oct 13, 2008
4
NO
Hi,

I have a customer who wants to move his site from an IIS server to Apache, but still using the asp solution. First I thought it was just to copy the files and the site would be up and running. I was totally wrong :)

One of the first problems i have met looks like a really simple problem, but I cannot figure it out. Here's the code:

Code:
<% 
dim memsearch, filtertext 
memsearch = session("memsearch") 
if memsearch = "" then 
filtertext = "<font class=bodytekst></font>" 
else 
filtertext = "<font class=bodytekst>Filter er aktivert:<br>Filter is activated:<br> <font size=3 color=red>"
filtertext = filtertext & memsearch 
filtertext = filtertext & "</font><br>Click search button to clear filter</font>" 
end if 
response.write(filtertext) 
%>

And here's the error message I get:

Error Type:
Sun ONE ASP VBScript compilation (0x800A0401)
Syntax error, unexpected "&", expecting end of statement
/medlliste.asp, line 746, column 91

The line number in the error message refers to the last line in the code: response.write(filtertext)

This might be a stupid question, but I am not too experienced with asp/vbscript

Thanks in advance.
Lars
 
One of the following
Code:
response.write filtertext
or
Code:
call response.write(filtertext)
 
Thanks for answering!

I tried both solutions, but still having the same error.

I really do not understand what the problem is here. It works fine on my locally installed IIS, but on the webhotel's apache server it wont work.
 
>...move his site from an IIS server to Apache, but still using the asp solution...
Without some sort of extension, it shouldn't work. But if he still use asp, what sort of extension he is using? If not, the server probably thinks it is php script or something and looking hard for a semi-colon to end the whole block of lines before encountering the closing tag.
 
The server runs "Sun ONE ASP VBScript" I guess this is the kind of asp/vbscript exctension you are talking about. I have an other asp page placed on this server, which is working perfectly :) So I am kinda stuck :s
 
Then it should not be the problem that can be drawn from the visible characters as shown in the post. Try re-enter the line breaks: there probably be some unprintable characters slipped in interfering.
 
I tried that too - didn't help :)

I am really considering rewriting the whole thing into php, but that would be a huge job :(
 
larschla said:
/medlliste.asp, line 746, column 91
The line number in the error message refers to the last line in the code: response.write(filtertext)

Are you sure you're looking at the right line?? Because, the line you refer to does not have 91 characters in it ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top