Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


SUB is not working

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> SUB is not working
  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 >>
 SUB is not working - 5/14/2008 6:58:43 PM   
  moni


Posts: 2
Score: 0
Joined: 5/14/2008
Status: offline
i have a form in an asp page with 2 buttons..
the 1st button redirects it to the same page but with different coding..

<form name="form1" method="post" action="SAMEPAGE.asp">

2nd button needs to redirect it to a htm page..
what should i do??
i tried with a SUB..
but its not working..
no error is being shown but page is not getting redirected.

sub func()
response.Redirect("NEWPAGE.htm")
end sub

<input name="btn2" type="button" onClick="vbscript:func">

should i use another form & submit it to the NEWPAGE.htm.
i want to use a sub for this...
can u please resolve it !
 
 
Post #: 1
 
 RE: SUB is not working - 5/15/2008 2:20:04 AM   
  ambivalent

 

Posts: 3
Score: 0
Joined: 7/24/2006
Status: offline
<input name="btn2" type="button" >

sub btn2_onclick

  'do stuff

end sub

(in reply to moni)
 
 
Post #: 2
 
 RE: SUB is not working - 5/15/2008 9:45:37 PM   
  moni


Posts: 2
Score: 0
Joined: 5/14/2008
Status: offline
Yes i did the same...

i mistakenly added () in the previous post...
but it was still not working..

what actually i was trying to do is....

these's a form with a checkbox..
if checkbox is checked page goes to an asp page..(holding connectivity with database)
if checkbox is unchecked it goes somewhere else..

so when it is checked the target asp page first update the database.. and hen displays another form on the same page..
now i wanted this second form to be posted on the same page again...
means it would be the THIRD time when the same page is target..
but everytime it is expected to run different code... all of database connectivity..

it is a bit complicated for me :(

(in reply to ambivalent)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> SUB is not working 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