I have three conditions within a VBScript. For some reason, all three seem to execute regardless of what is selected. (Ex: The e-mail is sent if the user enters no, or yes. I only want the e-mail sent if the value of what the user enters exceeds 50000.) Below is my code. What am I missing?
Dim MyVar
MyVar=MsgBox("You have entered xyz. Do you want to continue?",292,"Warning")
If MyVar=7 Then
window.location="returntoform.asp"
ElseIf MyVar=6 And <output>#XYZ#</output> > 50000 And <output>#XYZ#</cfoutput> < 10000 Then
window.opener.location.reload()
window.close
ElseIf MyVar=6 And <output>#XYZ#</output> > 50000 Then
<mail to="#recipient#" from="#sender#" subject="">
Message Text Goes Here
</mail>
End If
Dim MyVar
MyVar=MsgBox("You have entered xyz. Do you want to continue?",292,"Warning")
If MyVar=7 Then
window.location="returntoform.asp"
ElseIf MyVar=6 And <output>#XYZ#</output> > 50000 And <output>#XYZ#</cfoutput> < 10000 Then
window.opener.location.reload()
window.close
ElseIf MyVar=6 And <output>#XYZ#</output> > 50000 Then
<mail to="#recipient#" from="#sender#" subject="">
Message Text Goes Here
</mail>
End If