history.go('url') not working in IE7 - DOTNET

This is a discussion on history.go('url') not working in IE7 - DOTNET ; Hi all, Just a little javascript problem here. All the documentation I have seen, besides showing numerics in the example, such as in history.go(-1), also mention that if a part of the URL is used then the browser will go ...

+ Reply to Thread
Results 1 to 3 of 3

history.go('url') not working in IE7

  1. Default history.go('url') not working in IE7

    Hi all,

    Just a little javascript problem here. All the documentation I have seen,
    besides showing numerics in the example, such as in history.go(-1), also
    mention that if a part of the URL is used then the browser will go to the
    nearest history entry with that string in the name of the URL.

    Now that I come to think of it, there is no mention as to whether that means
    forward or backward. I just assumed backward.

    In IE7 the history.go(-1) or history.go(-2) works just fine.

    When I replace that syntax with history.go('mysite.com/test.aspx'), which is
    where history.go(-1) takes me, and I follow the exact same navigation steps
    as before when I click the button that fires the JS, the window just sits at
    its current url.

    Anyone have an idea what I might be doing wrong?

    BTW... I have a reason for using history.go. There may be a better way for
    what I am trying to accomplish, but for now I need to know why this
    documented feature is not working.

    Since I am working with ASP.NET 2.0 and VB in VS2005, I am posting here
    instead of a JavaScript group somewhere.

    Thanks for any help.



  2. Default Re: history.go('url') not working in IE7

    John Kotuby presented the following explanation :
    > Hi all,
    >
    > Just a little javascript problem here. All the documentation I have seen,
    > besides showing numerics in the example, such as in history.go(-1), also
    > mention that if a part of the URL is used then the browser will go to the
    > nearest history entry with that string in the name of the URL.
    >
    > Now that I come to think of it, there is no mention as to whether that means
    > forward or backward. I just assumed backward.
    >
    > In IE7 the history.go(-1) or history.go(-2) works just fine.
    >
    > When I replace that syntax with history.go('mysite.com/test.aspx'), which is
    > where history.go(-1) takes me, and I follow the exact same navigation steps
    > as before when I click the button that fires the JS, the window just sits at
    > its current url.
    >
    > Anyone have an idea what I might be doing wrong?
    >
    > BTW... I have a reason for using history.go. There may be a better way for
    > what I am trying to accomplish, but for now I need to know why this
    > documented feature is not working.
    >
    > Since I am working with ASP.NET 2.0 and VB in VS2005, I am posting here
    > instead of a JavaScript group somewhere.
    >
    > Thanks for any help.


    MSDN specifies "A string indicates an exact URL in the History list."
    So a substring would not work.

    Hans Kesting



  3. Default Re: history.go('url') not working in IE7

    Thank you Hans,
    I have been looking at JavaScript documentation and completely ignoring
    JScript. I have long held the opinion that JScript was exceedingly
    proprietary in its syntax and therefore have been avoiding it in an effort
    to stick with ECMA standards. Therefore it never really crossed my mind to
    search MSDN for any JScript articles.

    However, I am working with IE7 and ASP.NET. so maybe proprietary is poking
    it's ugly head up in spite of my efforts, or maybe I just misinterpreted
    other javascript articles, which seemed to indicate that a substring would
    achieve the desired result.
    ---------------------------------------
    Code:
    <INPUT TYPE="button" VALUE="Go" onClick="history.go('home.newco.com')">
    Explanation:
    In this example, a button is created, which when pressed, loads the nearest
    History entry that contains the string "home.newco.com".
    --------------------------------------

    In the future I will consult the MSDN articles first.

    Thanks again

    "Hans Kesting" <invalid.hansdk@spamgourmet.com> wrote in message
    news:mn.1b197d81500d9a28.82533@spamgourmet.com...
    > John Kotuby presented the following explanation :
    >> Hi all,
    >>
    >> Just a little javascript problem here. All the documentation I have seen,
    >> besides showing numerics in the example, such as in history.go(-1), also
    >> mention that if a part of the URL is used then the browser will go to the
    >> nearest history entry with that string in the name of the URL.
    >>
    >> Now that I come to think of it, there is no mention as to whether that
    >> means forward or backward. I just assumed backward.
    >>
    >> In IE7 the history.go(-1) or history.go(-2) works just fine.
    >>
    >> When I replace that syntax with history.go('mysite.com/test.aspx'), which
    >> is where history.go(-1) takes me, and I follow the exact same navigation
    >> steps as before when I click the button that fires the JS, the window
    >> just sits at its current url.
    >>
    >> Anyone have an idea what I might be doing wrong?
    >>
    >> BTW... I have a reason for using history.go. There may be a better way
    >> for what I am trying to accomplish, but for now I need to know why this
    >> documented feature is not working.
    >>
    >> Since I am working with ASP.NET 2.0 and VB in VS2005, I am posting here
    >> instead of a JavaScript group somewhere.
    >>
    >> Thanks for any help.

    >
    > MSDN specifies "A string indicates an exact URL in the History list."
    > So a substring would not work.
    >
    > Hans Kesting
    >
    >



+ Reply to Thread