HighDots Forums  

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

Javascript JavaScript language (comp.lang.javascript)


Discuss history.go('url') not working in IE7 in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John Kotuby
 
Posts: n/a

Default history.go('url') not working in IE7 - 01-02-2008 , 08:40 PM






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.

Thanks for any help


Reply With Quote
  #2  
Old   
Hal Rosser
 
Posts: n/a

Default Re: history.go('url') not working in IE7 - 01-02-2008 , 09:10 PM







"John Kotuby" <johnk (AT) powerlist (DOT) com> wrote

Quote:
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.

Thanks for any help
I believe the URL needs to exist in the history list.
according to
http://devguru.com/technologies/javascript/10953.asp




Reply With Quote
  #3  
Old   
John Kotuby
 
Posts: n/a

Default Re: history.go('url') not working in IE7 - 01-03-2008 , 12:11 PM



Thanks Hal,
I discovered that the problem came from my just using a part of the URL that
was in History. Some of the documentation inferred (or maybe I
misinterpreted) that a substring ot the URL, for example not including the
QueryString, would suffice to locate the nearest History entry containing
the substring. At least for IE7 the rule seems to be the entire URL
including the QueryString along with the exact parameters must be used for
history.go('url') to function properly.

"Hal Rosser" <hmrosser (AT) bellsouth (DOT) net> wrote

Quote:
"John Kotuby" <johnk (AT) powerlist (DOT) com> wrote in message
news:3WXej.3812$lo5.963 (AT) newssvr19 (DOT) news.prodigy.net...
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.

Thanks for any help

I believe the URL needs to exist in the history list.
according to
http://devguru.com/technologies/javascript/10953.asp





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.