Issues with MsgBox result
-
Disclaimer: Company limitation requires me to code in classic asp and not .Net Brain fried. I've tried rearranging this a million different ways and not getting the right result. What I want is, if the user selects "YES" on the message box, it redirects to another page. The actual message box appears fine, but I don't know how to pass that Yes variable to my code to redirect to the other page.
<%Dim DeckName, DeckNo
DeckName = Request.QueryString("DeckName")
DeckNo = Request.QueryString("DeckNo")
If Request.QueryString("Change") = "Y" then %>
<script language="VBScript">
Msgbox "Would you like to also update UMID Deck Rev Number?", vbYesNo'And if the user selects Yes, then Response.Redirect("UMID_EditDeck.asp?DeckNum=" & DeckNo)
</script>
<% End If %>Someone unscramble my brain, please.
---------------------------------- I'm not a programmer by trade, so please don't beat me unmerciful.
-
Disclaimer: Company limitation requires me to code in classic asp and not .Net Brain fried. I've tried rearranging this a million different ways and not getting the right result. What I want is, if the user selects "YES" on the message box, it redirects to another page. The actual message box appears fine, but I don't know how to pass that Yes variable to my code to redirect to the other page.
<%Dim DeckName, DeckNo
DeckName = Request.QueryString("DeckName")
DeckNo = Request.QueryString("DeckNo")
If Request.QueryString("Change") = "Y" then %>
<script language="VBScript">
Msgbox "Would you like to also update UMID Deck Rev Number?", vbYesNo'And if the user selects Yes, then Response.Redirect("UMID_EditDeck.asp?DeckNum=" & DeckNo)
</script>
<% End If %>Someone unscramble my brain, please.
---------------------------------- I'm not a programmer by trade, so please don't beat me unmerciful.
result=Msgbox "Would you like to also update UMID Deck Rev Number?", vbYesNo
If result = vbYes Then
Response.Redirect("UMID_EditDeck.asp?DeckNum=" & DeckNo)
Else
'Do what you want
End IfIs this what you are looking for? Sorry if I misunderstood your question, been a slow day here.
-
Disclaimer: Company limitation requires me to code in classic asp and not .Net Brain fried. I've tried rearranging this a million different ways and not getting the right result. What I want is, if the user selects "YES" on the message box, it redirects to another page. The actual message box appears fine, but I don't know how to pass that Yes variable to my code to redirect to the other page.
<%Dim DeckName, DeckNo
DeckName = Request.QueryString("DeckName")
DeckNo = Request.QueryString("DeckNo")
If Request.QueryString("Change") = "Y" then %>
<script language="VBScript">
Msgbox "Would you like to also update UMID Deck Rev Number?", vbYesNo'And if the user selects Yes, then Response.Redirect("UMID_EditDeck.asp?DeckNum=" & DeckNo)
</script>
<% End If %>Someone unscramble my brain, please.
---------------------------------- I'm not a programmer by trade, so please don't beat me unmerciful.
You can use javascript as well for this:
<%Dim DeckName, DeckNo
DeckName = Request.QueryString("DeckName")
DeckNo = Request.QueryString("DeckNo")
If Request.QueryString("Change") = "Y" then %><script type="text/javascript">
var r=confirm("Would you like to also update UMID Deck Rev Number?");
if (r==true)
{
window.location.replace("UMID_EditDeck.asp?DeckNum=<%=DeckNo%>");
}
}
</script>
<% End If %>Om Prakash Pant