Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Issues with MsgBox result

Issues with MsgBox result

Scheduled Pinned Locked Moved ASP.NET
csharptoolstutorialquestionannouncement
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bomb_shell
    wrote on last edited by
    #1

    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.

    T O 2 Replies Last reply
    0
    • B Bomb_shell

      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.

      T Offline
      T Offline
      Tarakeshwar Reddy
      wrote on last edited by
      #2

      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 If

      Is this what you are looking for? Sorry if I misunderstood your question, been a slow day here.

      1 Reply Last reply
      0
      • B Bomb_shell

        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.

        O Offline
        O Offline
        Om Prakash Pant
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups