Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


redirect page by clicking a button

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,1491
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> redirect page by clicking a button
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 redirect page by clicking a button - 10/19/2004 8:47:43 AM   
  xihu24

 

Posts: 1
Score: 0
Joined: 10/18/2004
From:
Status: offline
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>
 
 
Post #: 1
 
 Re: redirect page by clicking a button - 10/27/2004 11:09:50 AM   
  LatenTFactor

 

Posts: 1
Score: 0
Joined: 10/27/2004
From:
Status: offline
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

(in reply to xihu24)
 
 
Post #: 2
 
 Re: redirect page by clicking a button - 3/3/2005 12:48:16 AM   
  VBS

 

Posts: 110
Score: 0
Joined: 3/2/2005
From: Lebanon
Status: offline
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

(in reply to xihu24)
 
 
Post #: 3
 
 Re: redirect page by clicking a button - 3/28/2005 7:24:04 PM   
  vietnamblood

 

Posts: 14
Score: 0
Joined: 3/28/2005
From:
Status: offline
correct

(in reply to xihu24)
 
 
Post #: 4
 
 Re: redirect page by clicking a button - 4/1/2005 6:31:56 AM   
  larryw24

 

Posts: 8
Score: 0
Joined: 4/1/2005
From: USA
Status: offline
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>

(in reply to xihu24)
 
 
Post #: 5
 
 RE: Re: redirect page by clicking a button - 4/6/2007 6:22:01 AM   
  chalug

 

Posts: 1
Score: 0
Joined: 4/6/2007
Status: offline
quote:

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!

(in reply to VBS)
 
 
Post #: 6
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> redirect page by clicking a button Page: [1]
Jump to:





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
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts