...

View Full Version : Modify browser URL without refresh page



mapg
06-16-2007, 02:41 PM
Hi All,

I would like to ask if it is possible to modify some part of the browser URL without refresh page in the OnClick event over a form or link inserted in the HTML code.

Currently I use ...

if (blah == blah) {
window.location.href = window.location.href.replace(/\&ni\=on/ig, '');
}But this force to refreshing.

I want to remove "&ni=on" without refresh page as I mentioned.

Is it possible? Any idea is welcome.

Thank you in advance.

Mapg

A1ien51
06-16-2007, 03:00 PM
The only part of the URL you can change without causing the refresh is the hash.

window.location.hash = "foo";

Eric

mapg
06-16-2007, 03:31 PM
Thank you Eric.

Best,

Mapg



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum