Results 1 to 2 of 2

Thread: Show a Popup and Redirect

  1. #1

    Thread Starter
    Fanatic Member vuyiswamb's Avatar
    Join Date
    Jan 2007
    Location
    South Africa
    Posts
    829

    Show a Popup and Redirect

    Good Day

    i have this code

    Code:
                response.Write "<script>alert('You are now done with the 2013 roll value. You will now be taken to the 2017 roll to enter a valuation');</script>"
        
                    	Response.Redirect "/" & Session("PROJECT_ROOT") & "/GUI/Property/valuation/Value_Entry_Double.asp?parMethod=ADD&IsDoubleSupp=yes&parSubmitted=True&RollYearAdding=2017"
    The Page redirect without a popup, my assumption is that the Javascript runs after the redirect and by that time the page is disposed

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: Show a Popup and Redirect

    The redirect is being instigated from the server... you need to do it from the client side. with a response.write, it just sends the data to the client ... but it doesn't get a chance to run because the next thing the server does is redirect to a new page, undoing anything else you've sent up to this point.

    What do you do? Drop the reponse.redirect call ... add to the js script you're writing out to initiate the redirection from there... http://stackoverflow.com/questions/4...ith-javascript

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width