back button problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hypo

    #1

    back button problem

    I added a 'Back' button to my page, and wrote 'OnClick'
    code something like this:

    Response.Write( "<script>histor y.go(-" +
    iDepthIndex.ToS tring() + ");</script>");

    But, it dosnt work! Effect is that browser navigates to
    desired page as expected and go back from where it
    started! But, the 'Back' button on browser works normaly.
    I dont get it!!??

    Thanks in advance,
    Vedran
  • Steve C. Orr, MCSD

    #2
    Re: back button problem

    Here's some back button code that may work out better for you:


    --
    I hope this helps,
    Steve C. Orr, MCSD



    "Hypo" <vedran.bilopav lovic@hypo-alpe-adria.com> wrote in message
    news:060101c351 b1$bb3352b0$a60 1280a@phx.gbl.. .[color=blue]
    > I added a 'Back' button to my page, and wrote 'OnClick'
    > code something like this:
    >
    > Response.Write( "<script>histor y.go(-" +
    > iDepthIndex.ToS tring() + ");</script>");
    >
    > But, it dosnt work! Effect is that browser navigates to
    > desired page as expected and go back from where it
    > started! But, the 'Back' button on browser works normaly.
    > I dont get it!!??
    >
    > Thanks in advance,
    > Vedran[/color]


    Comment

    • Hypo

      #3
      Re: back button problem

      Thanks for the link but thats not what i wanted. That
      custom 'back' button uses Page.Redirect() method to
      navigate and that is not acceptible because original page
      (the page i want to return to) can go to several round-
      trips and transformations and my intention is to go back
      to exact same state of page what was left behind. Exactly
      same behavior like browser 'back' button. I still cant
      figure it out why JScript 'history.back() ' doesn work
      properly, any ideas ... ? And, btw, I navigate to that
      page (with 'back' button) using Server.Transfer () method.

      Thanks

      [color=blue]
      >-----Original Message-----
      >Here's some back button code that may work out better[/color]
      for you:[color=blue]
      >http://www.ftponline.com/vsm/2003_07...ne/columns/qa/
      >
      >--
      >I hope this helps,
      >Steve C. Orr, MCSD
      >http://Steve.Orr.net
      >
      >
      >"Hypo" <vedran.bilopav lovic@hypo-alpe-adria.com> wrote[/color]
      in message[color=blue]
      >news:060101c35 1b1$bb3352b0$a6 01280a@phx.gbl. ..[color=green]
      >> I added a 'Back' button to my page, and wrote 'OnClick'
      >> code something like this:
      >>
      >> Response.Write( "<script>histor y.go(-" +
      >> iDepthIndex.ToS tring() + ");</script>");
      >>
      >> But, it dosnt work! Effect is that browser navigates to
      >> desired page as expected and go back from where it
      >> started! But, the 'Back' button on browser works[/color][/color]
      normaly.[color=blue][color=green]
      >> I dont get it!!??
      >>
      >> Thanks in advance,
      >> Vedran[/color]
      >
      >
      >.
      >[/color]

      Comment

      • Hypo

        #4
        Re: back button problem

        Thanks for the link but thats not what i wanted. That
        custom 'back' button uses Page.Redirect() method to
        navigate and that is not acceptible because original page
        (the page i want to return to) can go to several round-
        trips and transformations and my intention is to go back
        to exact same state of page what was left behind. Exactly
        same behavior like browser 'back' button. I still cant
        figure it out why JScript 'history.back() ' doesn work
        properly, any ideas ... ? And, btw, I navigate to that
        page (with 'back' button) using Server.Transfer () method.

        Thanks

        [color=blue]
        >-----Original Message-----
        >Here's some back button code that may work out better[/color]
        for you:[color=blue]
        >http://www.ftponline.com/vsm/2003_07...ne/columns/qa/
        >
        >--
        >I hope this helps,
        >Steve C. Orr, MCSD
        >http://Steve.Orr.net
        >
        >
        >"Hypo" <vedran.bilopav lovic@hypo-alpe-adria.com> wrote[/color]
        in message[color=blue]
        >news:060101c35 1b1$bb3352b0$a6 01280a@phx.gbl. ..[color=green]
        >> I added a 'Back' button to my page, and wrote 'OnClick'
        >> code something like this:
        >>
        >> Response.Write( "<script>histor y.go(-" +
        >> iDepthIndex.ToS tring() + ");</script>");
        >>
        >> But, it dosnt work! Effect is that browser navigates to
        >> desired page as expected and go back from where it
        >> started! But, the 'Back' button on browser works[/color][/color]
        normaly.[color=blue][color=green]
        >> I dont get it!!??
        >>
        >> Thanks in advance,
        >> Vedran[/color]
        >
        >
        >.
        >[/color]

        Comment

        • Steve C. Orr, MCSD

          #5
          Re: back button problem

          OIC, well Server.Transfer is likely the cause of some of your headaches.
          You see this operation happens entirely on the server and the browser is
          never even notified. When you say history.back, you're telling the browser
          to go back a page. So it does - according to it's history, not knowing
          about the server.transfer that took place on the server. You may have
          better luck if you use Response.Redire ct instead since this happens through
          the browser.

          --
          I hope this helps,
          Steve C. Orr, MCSD



          "Hypo" <vedran.bilopav lovic@hypo-alpe-adria.com> wrote in message
          news:0c4801c351 e4$5304e950$a40 1280a@phx.gbl.. .[color=blue]
          > Thanks for the link but thats not what i wanted. That
          > custom 'back' button uses Page.Redirect() method to
          > navigate and that is not acceptible because original page
          > (the page i want to return to) can go to several round-
          > trips and transformations and my intention is to go back
          > to exact same state of page what was left behind. Exactly
          > same behavior like browser 'back' button. I still cant
          > figure it out why JScript 'history.back() ' doesn work
          > properly, any ideas ... ? And, btw, I navigate to that
          > page (with 'back' button) using Server.Transfer () method.
          >
          > Thanks
          >
          >[color=green]
          > >-----Original Message-----
          > >Here's some back button code that may work out better[/color]
          > for you:[color=green]
          > >http://www.ftponline.com/vsm/2003_07...ne/columns/qa/
          > >
          > >--
          > >I hope this helps,
          > >Steve C. Orr, MCSD
          > >http://Steve.Orr.net
          > >
          > >
          > >"Hypo" <vedran.bilopav lovic@hypo-alpe-adria.com> wrote[/color]
          > in message[color=green]
          > >news:060101c35 1b1$bb3352b0$a6 01280a@phx.gbl. ..[color=darkred]
          > >> I added a 'Back' button to my page, and wrote 'OnClick'
          > >> code something like this:
          > >>
          > >> Response.Write( "<script>histor y.go(-" +
          > >> iDepthIndex.ToS tring() + ");</script>");
          > >>
          > >> But, it dosnt work! Effect is that browser navigates to
          > >> desired page as expected and go back from where it
          > >> started! But, the 'Back' button on browser works[/color][/color]
          > normaly.[color=green][color=darkred]
          > >> I dont get it!!??
          > >>
          > >> Thanks in advance,
          > >> Vedran[/color]
          > >
          > >
          > >.
          > >[/color][/color]


          Comment

          Working...