| re: if...if...else if...multi conditional statements problem
Patrice,
With a bit of cleaning up, I /think/ this is what you wanted
if ( sdiv = 3 ) then
if snat="" then
response.write(corpclientsmaintext)
else
if ( snat = 1 or snat = 2 ) then
response.write( . . .
call loopDatas(arrCorpoType)
response.write("</td></tr></table>")
end if
end if
else
response.write(arrCorpo(sparam,sdiv))
end if
You've been caught out by VB[Script]'s one-line form of "If" :
If condition Then action
Written this way, there's no "End If" and you /can't/ [easily] use an
"Else" with it, either. My Advice: avoid it.
HTH,
Phill W.
"Patrice" <manitoo@videotron.ca> wrote in message
news:leZ7c.83648$ZY6.1226196@wagner.videotron.net. ..[color=blue]
> Hi,
> I need to do multi-conditional statements like below, but this error is
> displayed :
> Expected 'End'
> /myFilepath, line x
> else response.write(arrCorpo(sparam,sdiv)) end if
>
> I don't understand why this 'Expected 'End'' error is called!
> Here is my code:[/color] |