• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 524
  • Last Modified:

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
0
admjeno
Asked:
admjeno
  • 2
1 Solution
 
pvginkelCommented:
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.
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
To know exactly what's going on, we need more information than that - you don't even have the while statement listed.

Though I assume "good" and "normal" are numeric values?

Also, Elseif is not used that way, it should look more like this:

if fldstatus > good then
    fldpicture1 = "<img src=""images/good.gif "">" 
elseif fldstatus > normal then
    fldpicture1 = "<img src=""images/normal.gif "">"
End if
0
 
admjenoAuthor Commented:
Yes thats right! i'm using numeric values!
Is it something else i have to think about?
Thanks for your help!
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Like I said, more of your code would help answer the question and as we both said, your if statement needs to be modified.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now