Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    UK
    Posts
    302
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Redirect Refresh Help!

    I'm trying to reload a page once as content is loaded from this redirect

    Code:
    Response.Redirect("selection.asp?Edit=Home&Section=1&Tab=0&Saved=True")
    My ASP pages are not displaying correctly until I hit the reload button on the browser.

    I have tried everything I can see on the net. The kicker on this is I don't understand why its not refreshing my content.

    Any help would be great!

    Mike
    Kind regards,
    Mike Hughes

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,652
    Thanks
    80
    Thanked 4,640 Times in 4,602 Posts
    Can't begin to guess. I've never had any similar problems.

    Well...maybe I do have a weird possible answer.

    If you have already written any content to the browser and then flushed the output buffer, then Response.Redirect can *NOT* work. But if you have an ON ERROR RESUME NEXT in place, then you won't get a message about it not working. It will just silently do nothing.

    It doesn't sound to me like your problem, but...

    I don't suppose you can show this at a live URL?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    UK
    Posts
    302
    Thanks
    16
    Thanked 0 Times in 0 Posts
    Hey, thanks for reply.

    I can't offer up the URL - Sorry!

    Let's see if I can offer a bit more on this. I have several forms that sit within various tabs 0 to 9 to be exact.

    They are included within this page you see called selection.asp. The idea I have created is that you complete a form in one of these tabs and then post to a database and the redirect below puts you back to that tab and form.

    Then my issue happens the form doesn't update first time with its newly saved content.

    Any further thoughts.?

    Mike
    Kind regards,
    Mike Hughes

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,652
    Thanks
    80
    Thanked 4,640 Times in 4,602 Posts
    So the <form action=> does *NOT* specify "selection.asp"? That is, you are using another page to process the form posting?

    *******

    Have you considered using AJAX to post the form, so you don't have to reload the page, which must be a slow process given the multiple tabs?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Location
    UK
    Posts
    302
    Thanks
    16
    Thanked 0 Times in 0 Posts
    Sorry I can't post this URL for you.. I know it would help

    Okay, the form is posting to
    Code:
          <form id="save" method="post" action="save.asp?Action=Update1">
    But, this form is in a include file
    Code:
    <!--#Include file="editor.asp"-->
    within the selection.asp page

    After the form saves to DB it redirects back to
    Code:
    Response.Redirect("selection.asp?Edit=Home&Section=1&Tab=0&Saved=True")
    I was doing some testing on this last night and redirected back to
    Code:
    editor.aspEdit=Home&Section=1&Tab=0&Saved=True
    rather than the selection page. Even with this I get mixed results and I had to use this too

    Code:
    <script type="text/javascript">
       if(window.location.href.substr(-2) !== "?r") {
          window.location = window.location.href + "?r";
        }
    </script>
    Without this script I got mixed results.

    Mike
    Kind regards,
    Mike Hughes

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,652
    Thanks
    80
    Thanked 4,640 Times in 4,602 Posts
    It makes no sense at all that you could or would redirect back to "editor.asp" when that file is just #include'd in "selection.asp". I can't see any way that would possibly work.

    What happens if you simply use the URL
    selection.asp?Edit=Home&Section=1&Tab=0&Saved=True
    from the address bar of the browser?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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