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
Logon Script Causing Laptops To Hang - Problems in script? VB Script
problem passing args to script 'There is no script engine for file extenstion' VB Script
Include another script, keep variables in included script? PowerShell
Script file has 'OS Handle' error when run from script PowerShell
Can you drag-n-drop a file on top of a PS script to run the script? PowerShell