Click here to Skip to main content
16,011,868 members
Home / Discussions / Web Development
   

Web Development

 
QuestionMy Newest Website - Testers? Pin
Davy Mitchell30-Jan-03 21:06
Davy Mitchell30-Jan-03 21:06 
QuestionWait( ) function for VBScript? Pin
devvvy30-Jan-03 19:11
devvvy30-Jan-03 19:11 
AnswerRe: Wait( ) function for VBScript? Pin
Torsten Mauz31-Jan-03 2:47
Torsten Mauz31-Jan-03 2:47 
GeneralRe: Wait( ) function for VBScript? Pin
devvvy31-Jan-03 9:42
devvvy31-Jan-03 9:42 
GeneralObject.Sleep Pin
devvvy31-Jan-03 12:25
devvvy31-Jan-03 12:25 
GeneralRe: Object.Sleep Pin
Torsten Mauz31-Jan-03 15:53
Torsten Mauz31-Jan-03 15:53 
GeneralRe: Object.Sleep Pin
devvvy31-Jan-03 17:33
devvvy31-Jan-03 17:33 
GeneralRe: Object.Sleep Pin
Torsten Mauz31-Jan-03 23:39
Torsten Mauz31-Jan-03 23:39 
Try this code:

<head></head>
<body>
...
<script Language="VBScript">
Sub Login()
document.redirect_login_form.submit
End Sub
</script>
...
<form name=redirect_login_form method="post" action="login_gui.asp">
... some hidden variables here...
</form>
...
...
...
...
<%
Response.Write "CAN YOU SEE THIS MESSAGE?"
Response.Flush()


<script language="VBScript">
call setTimeout("delayedSub", 1000)
sub delayedSub()
If (bExistingLogin="1" Or bSuspended="1" Or bEMailPrevReg="1") Then %>
window.history.go(-1)
<% Else %>
Login()
<% End If %>
end sub
</script>
</body>

That should be all you need to do.

the reason you are getting an error with setTimeout is because in VBScript you need to add the "call" keyword before a sub call if you use the parentheses. otherwise VBScript thinks it is a function.

i.e. you can call a sub in two ways:
1. subname param1, param2
2. call subname(param1, param2)

If you're still stuck after this then feel free to email me a copy of your code and I will fix it and annotate the fixes for you which might be a bit clearer then a forum post.

HTH
Generalhere's a simple solution to the problem Pin
devvvy2-Feb-03 20:18
devvvy2-Feb-03 20:18 
Generalscript block and Server.Transfer Pin
devvvy30-Jan-03 17:06
devvvy30-Jan-03 17:06 
GeneralRe: script block and Server.Transfer Pin
devvvy30-Jan-03 17:10
devvvy30-Jan-03 17:10 
GeneralRe: script block and Server.Transfer Pin
Paul Watson30-Jan-03 22:46
sitebuilderPaul Watson30-Jan-03 22:46 
GeneralRe: script block and Server.Transfer Pin
devvvy30-Jan-03 22:47
devvvy30-Jan-03 22:47 
GeneralASP .NET Web Hosting Pin
perlmunger30-Jan-03 6:56
perlmunger30-Jan-03 6:56 
GeneralRe: ASP .NET Web Hosting Pin
Paul Riley30-Jan-03 7:03
Paul Riley30-Jan-03 7:03 
GeneralRe: ASP .NET Web Hosting Pin
perlmunger30-Jan-03 7:35
perlmunger30-Jan-03 7:35 
GeneralRe: ASP .NET Web Hosting Pin
Paul Riley30-Jan-03 7:35
Paul Riley30-Jan-03 7:35 
GeneralRe: ASP .NET Web Hosting Pin
perlmunger30-Jan-03 7:49
perlmunger30-Jan-03 7:49 
GeneralAdd - Remove between two HTML List Boxes Pin
jerry0davis30-Jan-03 5:59
jerry0davis30-Jan-03 5:59 
GeneralRe: Add - Remove between two HTML List Boxes Pin
DFU2330-Jan-03 6:51
DFU2330-Jan-03 6:51 
GeneralRe: Add - Remove between two HTML List Boxes Pin
Torsten Mauz30-Jan-03 8:00
Torsten Mauz30-Jan-03 8:00 
GeneralRe: Add - Remove between two HTML List Boxes Pin
jerry0davis30-Jan-03 21:50
jerry0davis30-Jan-03 21:50 
GeneralRe: Add - Remove between two HTML List Boxes Pin
jerry0davis30-Jan-03 21:47
jerry0davis30-Jan-03 21:47 
GeneralSearch facility for website Pin
Member 20664930-Jan-03 3:21
Member 20664930-Jan-03 3:21 
GeneralRe: Search facility for website Pin
Jon Sagara30-Jan-03 5:18
Jon Sagara30-Jan-03 5:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.