Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-04-01 Thread Thomas Broyer
On 1 avr, 01:54, Ian Bambury wrote: > 2009/3/31 Thomas Broyer > > > > > Depends what "original token" is defined to be ;-) > > if it is History.getToken(), then I'm back to my earlier proposal: > > propagate a "is default" flag. > > I'm happy for you to define 'original token' if you can get i

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-31 Thread Ian Bambury
2009/3/31 Thomas Broyer > > > Depends what "original token" is defined to be ;-) > if it is History.getToken(), then I'm back to my earlier proposal: > propagate a "is default" flag. I'm happy for you to define 'original token' if you can get it to work. But I don't need an isDefault flag - I

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-31 Thread Thomas Broyer
On 31 mar, 19:50, Ian Bambury wrote: > The examples site was just an, er, example :-) > This is the 1.6 replacement which will initially be used on a new site, but > will eventually get used elsewhere. > > 2009/3/31 Thomas Broyer > > > > > Ah, OK, then just don't do anything if the original to

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-31 Thread Ian Bambury
The examples site was just an, er, example :-) This is the 1.6 replacement which will initially be used on a new site, but will eventually get used elsewhere. 2009/3/31 Thomas Broyer > > > Ah, OK, then just don't do anything if the original token is blank? > i.e. http://examples.roughian.com wil

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-31 Thread Thomas Broyer
already *know* when I need to use replace (the original > token is blank), and the code already does what it should (and did before I > posted) - the problem is, as originally stated in my first post, that... > > Window.Location.replace() doesn't work in Safari or Chrome or Opera >

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-31 Thread Ian Bambury
t; change your framework a bit... I don't need to. I already *know* when I need to use replace (the original token is blank), and the code already does what it should (and did before I posted) - the problem is, as originally stated in my first

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-31 Thread Thomas Broyer
On 31 mar, 03:03, Ian Bambury wrote: > There are any number of menus nested within each other. They are all > instances of the same widget. Eventually, you reach a non-menu, a real > 'page'. > > The top level menu reacts to history. It passes this to a routine in the top > menu called setMenuBy

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-30 Thread Ian Bambury
There are any number of menus nested within each other. They are all instances of the same widget. Eventually, you reach a non-menu, a real 'page'. The top level menu reacts to history. It passes this to a routine in the top menu called setMenuByToken(oldToken, newToken) It may get passed a token

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-30 Thread Thomas Broyer
On 30 mar, 23:04, Ian Bambury wrote: > > The thing is, the history calls the screen set-up routine with a token, the > menu system calls it, the onModuleLoad calls it with or without a bookmark. > > The 'Home' token varies depending on what the menu items are called (this is > where the token co

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-30 Thread Ian Bambury
end up with a blank one > followed > > by 'Home'. So if someone clicks 'Back' they will be back at the blank > one. > > Which will create 'Home' again and lock them into my site, which is what > I > > am trying to avoid. > > > > T

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-30 Thread Adam T
'Back' they will be back at the blank one. > Which will create 'Home' again and lock them into my site, which is what I > am trying to avoid. > > This is exactly the situation I have already. So I tried to 'replace' the > token if the current one is blank.

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-30 Thread Ian Bambury
ack at the blank one. Which will create 'Home' again and lock them into my site, which is what I am trying to avoid. This is exactly the situation I have already. So I tried to 'replace' the token if the current one is blank. But Window.Location.replace() doesn't work in Safa

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-30 Thread Thomas Broyer
On 29 mar, 22:43, Ian Bambury wrote: > 2009/3/29 Thomas Broyer > > > > >  Am I clearer? > > I don't know. I know I'm not :-) > > OK. Where do you see this bit of code living? > > String token = History.getToken(); > if (token.length() == 0) { > token = HIS_INTRO;} > > onHistoryChanged(token);

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-29 Thread Ian Bambury
2009/3/29 Thomas Broyer > > Am I clearer? > I don't know. I know I'm not :-) OK. Where do you see this bit of code living? String token = History.getToken(); if (token.length() == 0) { token = HIS_INTRO; } onHistoryChanged(token); --~--~-~--~~~---~--~~ You rec

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-29 Thread Thomas Broyer
On 29 mar, 18:34, Ian Bambury wrote: > Hi Thomas, > > This doesn't overwrite the existing history entry (http://mydomain.com/) it > just adds another entry with a bookmark. I'm trying not to have two entries > added when a user first goes to my site because the back button will take > them to h

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-29 Thread Ian Bambury
Hi Thomas, This doesn't overwrite the existing history entry (http://mydomain.com/) it just adds another entry with a bookmark. I'm trying not to have two entries added when a user first goes to my site because the back button will take them to http://mydomain.com and that will immediately take th

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-29 Thread Thomas Broyer
> 2009/3/29 Adam T > > >String token = History.getToken(); > >if (token.length() != 0) { > >onHistoryChanged(token); > >} else { > >History.newItem(HIS_INTRO, true); > >} On 29 mar, 1

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-29 Thread Ian Bambury
It gets more complicated: When you replace a location, FF, Opera, Safari and Chrome fire a historyChange event, IE doesn't --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this gr

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-29 Thread Ian Bambury
Hi Adam, Your site does what mine does, i.e you end up with two history entries, one for / and one for /#intro. I'm trying to avoid that so that if the user clicks the back button, they go back to where they came from, not back to the page without the bookmark (which in my case will redisplay the

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-29 Thread Adam T
Well, I'm not really sure what your doing, so it may not help - I was just guessing if you were trying to put #Home at the end of a url you might be trying to plug into GWT's History system. On this page http://gwtfx.adamtacy.com/EffectsExample.html I do that to manage tabs whose content is sucke

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-29 Thread Ian Bambury
Thanks for the reply, Adam > If you're using it for GWT history, you could alternatively set #Home > as the token when you initialise that subsystem. Could you explain how this would help? Thanks, Ian --~--~-~--~~~---~--~~ You received this message because

Re: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-28 Thread Adam T
Ian, maybe it's a Windows thing as it works fine on a my Mac with Safari and Opera (and Firefox). I was going to suggest trying JSNI instead, but looking at Window.Location.replace it is just a simple call to $wnd.location.replace(newURL) with no deferred binding to make a difference between Fire

Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-28 Thread Ian Bambury
But it's OK in IE and FF Any ideas? Workarounds? The line is Window.Location.replace(Window.Location.getHref() + "#" + newToken); And you can see it working (or not) here http://kivivi.com/ When you first go there, I'm trying to replace http://kivivi.com/ with http://kivivi.com/