PDA

View Full Version : Ext.History - removing the hash component



LisburnLad
2 May 2012, 4:13 AM
Hi,

I've just added the Ext.History to my website and everything appears to be working as it should.
However, when the user clicks on a link to return to the initial home page, I want to reset the URL to its initial value without any hash component. I tried Ext.History.add(""), but this still added the hash without any parameters.

So, for example, the site initially shows the URL "www.example.com", the user then clicks on a link and goes to "www.example.com#some_parameters", when they click on the "home" link I'd like the URL to once again shown "www.example.com" but it's currently showing "www.example.com#".

Is there a way to add an entry to the history so that the hash doesn't get shown?

Thanks,
Steve

mitchellsimoens
7 May 2012, 6:33 AM
I tend to always use a hash like #home to return back to home.

LisburnLad
8 May 2012, 3:58 AM
Thanks for that Mitchell, I had thought of using "#home" when I couldn't find a way to remove the hash.
Do you think it's currently not possible then to actually get rid of the hash?
If I find the time I'll look into the code to see what it's doing, otherwise I'll go for your "#home" suggestion.

Cheers,
Steve