Windows Vista Forums

VB Script

  1. #1


    dangoble Guest

    VB Script

    Hi,
    I am using an uploader program (.asp) that is written VBscript

    <%
    Response.Expires = -10000
    Server.ScriptTimeOut = 300

    Set theForm = Server.CreateObject("ABCUpload4.XForm")
    theForm.Overwrite = True
    theForm.MaxUploadSize = 8000000
    theForm.ID = Request.QueryString("ID")
    Set theField = theForm.Files("filefield1")
    If theField.FileExists Then
    theField.Save "Holdhomes/" & theField.FileName
    End If
    %>

    <html>
    <body>
    Upload Complete...
    <%
    response.redirect("http://www.xxx.com/")
    %>
    </body>
    </html>


    As you can see the "Upload Complete..." never shows because the
    program immediately redirects back to the upload page to allow my user
    to upload another pic.
    Please show me how to place a pause of 5 seconds in there so the user
    can see the upload is complete and be returned back to xxx.com in 5
    seconds
    Thanks

      My System SpecsSystem Spec

  2. #2


    Old Pedant Guest

    RE: VB Script

    "dangoble@xxxxxx" wrote:

    > As you can see the "Upload Complete..." never shows because the
    > program immediately redirects back to the upload page to allow my user
    > to upload another pic.
    > Please show me how to place a pause of 5 seconds in there so the user
    > can see the upload is complete and be returned back to xxx.com in 5
    > seconds
    You *CAN'T* do it in server side code. Period.

    You must do it in the browser.

    So...
    <head>
    <script language="javascript">
    function goBack( )
    {
    location.href = "uploadPage.asp"; // or wherever
    }
    </script>
    </head>
    <body onLoad="setTimeout( 'goBack( )', 5000 );">
    Upload complete...
    <p> <p>
    <a href="uploadPage.asp">Click here</a> if page doesn't refresh in 5 seconds.
    </body>

    ***********

    You could instead use a META-REFRESH, to avoid JavaScript, if you needed.




      My System SpecsSystem Spec

  3. #3


    Evertjan. Guest

    Re: VB Script

    wrote on 31 jul 2008 in microsoft.public.scripting.vbscript:

    > Hi,
    > I am using an uploader program (.asp) that is written VBscript
    >
    > <%
    > Response.Expires = -10000
    > Server.ScriptTimeOut = 300
    >
    > Set theForm = Server.CreateObject("ABCUpload4.XForm")
    > theForm.Overwrite = True
    > theForm.MaxUploadSize = 8000000
    > theForm.ID = Request.QueryString("ID")
    > Set theField = theForm.Files("filefield1")
    > If theField.FileExists Then
    > theField.Save "Holdhomes/" & theField.FileName
    > End If
    > %>
    >
    > <html>
    > <body>
    > Upload Complete...
    > <%
    > response.redirect("http://www.xxx.com/")
    > %>
    > </body>
    > </html>
    >
    >
    > As you can see the "Upload Complete..." never shows because the
    > program immediately redirects back to the upload page to allow my user
    > to upload another pic.
    > Please show me how to place a pause of 5 seconds in there so the user
    > can see the upload is complete and be returned back to xxx.com in 5
    > seconds
    The response.redirect sets a redirect in the html header, so that nobody
    is ever seen by the client.

    Use a clientside redirect, with a <meta> or javascript timer.


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

      My System SpecsSystem Spec

VB Script

Similar Threads
Thread Forum
Converting a BAT script into a PowerShell Script
Hi all, I am in the process of trying to convert a couple of our .BAT scripts into powershell scripts, however, I'm running into a couple of pesky...
PowerShell
Resume a script (or run a script) after reboot?
Can anyone suggest a good way to resume a script after reboot, or queue a script up to run (with commandline parameters) after a reboot? (I'm...
PowerShell
Logon Script Causing Laptops To Hang - Problems in script?
Hi, I'm using the following script to map drives, and perform a few functions when users logon to our domain. However, in the past 2 or 3 months...
VB Script
problem passing args to script 'There is no script engine for file extenstion'
Hello, I'm having an issue passing args to a script. I'm getting the error 'There is no script engine for file extenstion .net' I assume the...
VB Script
Include another script, keep variables in included script?
I want to run or include a PS script from within another PS script. But want the values set in the 2nd one to be available in the first one. For...
PowerShell
Script file has 'OS Handle' error when run from script
For my batch automation product, ActiveBatch, I've written a ps1 which is called from a cmd file, and which runs fine when run from command prompt....
PowerShell
Can you drag-n-drop a file on top of a PS script to run the script?
With VBScript files, you can drag-n-drop another file on top of the VBScript file. This executes the VBScript and then the path of the dropped file...
PowerShell