cluper
01-28-2004, 08:13 PM
I need to display a VBScript Yes/No MsgBox in an ASP page and return the Yes/No value to an ASP variable or call an ASP function from within the VBScript. See the following code where everything works except the call to the SetUpRptAndVarList("FixList") with a different parameter.
<% if SetUpRptAndVarList("InitialList") = FALSE then
Response.Write "SetUpRptAndVarList=FALSE<br>"
%>
<SCRIPT LANGUAGE="VBScript">
<!--
Dim MsgBoxReturnValue
MsgBoxReturnValue = MsgBox ("<%= strErrorMessage %>" + chr(13) + chr(10) + chr(13) + chr(10) + " Press the Yes button to remove variables until an acceptable length is reached." + chr(13) + chr(10) + " OR " + chr(13) + chr(10) + " Press the No button to return to the Custom Report Selections page." , <%= vbYesNo + vbQuestion + vbDefaultButton1 + vbApplicationModal %> , "Custom Report Specification Length Error" )
If MsgBoxReturnValue = <%= vbYes %> Then
<%= Call SetUpRptAndVarList("FixList") %>
Else
history.go(-3)
End if
-->
</SCRIPT>
<% else
Response.Write "SetUpRptAndVarList=TRUE<br>"
end if %>
<% if SetUpRptAndVarList("InitialList") = FALSE then
Response.Write "SetUpRptAndVarList=FALSE<br>"
%>
<SCRIPT LANGUAGE="VBScript">
<!--
Dim MsgBoxReturnValue
MsgBoxReturnValue = MsgBox ("<%= strErrorMessage %>" + chr(13) + chr(10) + chr(13) + chr(10) + " Press the Yes button to remove variables until an acceptable length is reached." + chr(13) + chr(10) + " OR " + chr(13) + chr(10) + " Press the No button to return to the Custom Report Selections page." , <%= vbYesNo + vbQuestion + vbDefaultButton1 + vbApplicationModal %> , "Custom Report Specification Length Error" )
If MsgBoxReturnValue = <%= vbYes %> Then
<%= Call SetUpRptAndVarList("FixList") %>
Else
history.go(-3)
End if
-->
</SCRIPT>
<% else
Response.Write "SetUpRptAndVarList=TRUE<br>"
end if %>