redirect page by clicking a button

Author Message
xihu24

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 10/18/2004
  • Location:
  • Status: offline
redirect page by clicking a button Tuesday, October 19, 2004 9:47 AM (permalink)
0
Hi, all,

I try to design a webpage which contains a button and by clicking the button the browser will display another webpage. The following does not work. Thank you for any suggestions!

xihu


quote:
<SCRIPT LANGUAGE="vbscript" RunAt="Server">
Sub btnAction_onclick()
Call Response.Redirect ("nextPage.asp")
End Sub
</SCRIPT>
<HTML>
<BODY>
<FORM method="post" id="frmAction" name="frmAction">
<INPUT type="button" name="btnAction" value="Act">
</FORM>
</BODY>
</HTML>
 
#1
    LatenTFactor

    • Total Posts : 1
    • Scores: 0
    • Reward points : 0
    • Joined: 10/27/2004
    • Location:
    • Status: offline
    Re: redirect page by clicking a button Wednesday, October 27, 2004 12:09 PM (permalink)
    0
    try this .. this snippet is in VB6 [8)]:

    Private Sub cmdRenewOnline_Click()
    Dim ie As New InternetExplorer
    '''''''''''''''''''''''''''''''''
    'Add your functionalityCode here'
    '''''''''''''''''''''''''''''''''
    'cmbMonths.SetFocus
    'If (cmbMonths.Text = "") Then
    'MsgBox ("Please select number of months")
    'cmbMonths.SetFocus
    Exit Sub
    End If

    cmbMonths.Text
    strURL = "www.yahoo.com"
    ie.Navigate (strURL)
    ie.AddressBar = True
    ie.Visible = True
    ie.Width = 1020
    ie.Height = 740
    ie.Top = 0
    ie.Left = 0

    End Sub
     
    #2
      VBS

      • Total Posts : 110
      • Scores: 0
      • Reward points : 0
      • Joined: 3/2/2005
      • Location: Lebanon
      • Status: offline
      Re: redirect page by clicking a button Thursday, March 03, 2005 1:48 AM (permalink)
      0
      Dear xihu24,

      Use this code(same as urs, but corrected)

      <SCRIPT LANGUAGE="vbscript">
      Sub btnAction_Click()
      window.location = "nextPage.asp"
      End Sub
      </SCRIPT>
      <HTML>
      <BODY>
      <FORM method="post" id="frmAction" name="frmAction">
      <INPUT type="button" name="btnAction" value="Act" onclick="vbscript:btnAction_Click">
      </FORM>
      </BODY>
      </HTML>

      Best Regards
      Firas S Assaad
       
      #3
        vietnamblood

        • Total Posts : 14
        • Scores: 0
        • Reward points : 0
        • Joined: 3/28/2005
        • Location:
        • Status: offline
        Re: redirect page by clicking a button Monday, March 28, 2005 8:24 PM (permalink)
        0
        correct
         
        #4
          larryw24

          • Total Posts : 8
          • Scores: 0
          • Reward points : 0
          • Joined: 4/1/2005
          • Location: USA
          • Status: offline
          Re: redirect page by clicking a button Friday, April 01, 2005 7:31 AM (permalink)
          0
          Why not something simple, like this:
          <form name="anything1" method="post" action="http://www.msn.com">
          <input type="submit" name="anything2" value="Go There">
          </form>
           
          #5
            chalug

            • Total Posts : 1
            • Scores: 0
            • Reward points : 0
            • Joined: 4/6/2007
            • Status: offline
            RE: Re: redirect page by clicking a button Friday, April 06, 2007 7:22 AM (permalink)
            0

            ORIGINAL: VBS

            Dear xihu24,

            Use this code(same as urs, but corrected)

            <SCRIPT LANGUAGE="vbscript">
            Sub btnAction_Click()
            window.location = "nextPage.asp"
            End Sub
            </SCRIPT>
            <HTML>
            <BODY>
            <FORM method="post" id="frmAction" name="frmAction">
            <INPUT type="button" name="btnAction" value="Act" onclick="vbscript:btnAction_Click">
            </FORM>
            </BODY>
            </HTML>

            Best Regards
            Firas S Assaad

             
            Genius!  I have been beating my brains out over this for days!!  Your code works for me!
             
            I have the coolest sig!
             
            #6

              Online Bookmarks Sharing: Share/Bookmark

              Jump to:

              Current active users

              There are 0 members and 1 guests.

              Icon Legend and Permission

              • New Messages
              • No New Messages
              • Hot Topic w/ New Messages
              • Hot Topic w/o New Messages
              • Locked w/ New Messages
              • Locked w/o New Messages
              • Read Message
              • Post New Thread
              • Reply to message
              • Post New Poll
              • Submit Vote
              • Post reward post
              • Delete my own posts
              • Delete my own threads
              • Rate post

              2000-2012 ASPPlayground.NET Forum Version 3.9