Link to home
Start Free TrialLog in
Avatar of admjeno
admjeno

asked on

Problem with Expected 'Wend'

Hi i'm new to asp code!

I need some help with a line!
i'm trying to use 5 lines with different pictures into it. if its solved, picture good or if its bad, picture bad!
the problem i have is that its complaining about "wend"
how can i write this without getting the wend message??

if fldstatus > good then fldpicture1 = "<img src=""images/good.gif "">" 
elseif fldstatus > normal then fldpicture1 = "<img src=""images/normal.gif "">"

Error Type:
Microsoft VBScript compilation (0x800A03FA)
Expected 'Wend'


please help an old technician
Avatar of pvginkel
pvginkel
Flag of Netherlands image

There needs to be an endif at the end. Try to rewrite it to something like this:

if fldstatus > good then
  fldpicture1 = "<img src=""images/good.gif "">" 
elseif
  fldstatus > normal then fldpicture1 = "<img src=""images/normal.gif "">"
endif

ASP works in code blocks which you always need to end. It's not like php or C in that manner. There are no 1-line blocks.
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of admjeno
admjeno

ASKER

Yes thats right! i'm using numeric values!
Is it something else i have to think about?
Thanks for your help!
Like I said, more of your code would help answer the question and as we both said, your if statement needs to be modified.