View Full Version : Changing URL after every keypress?

07-20-2009, 09:44 AM
Is it possible to change the part of the URL after a # symbol using javascript (and not anchor tags)?

ie. is there a way to change http://localhost/#one to http://localhost/#two with a javascript function/event?

Is it compatible with major browsers?

Thanks for the help

Philip M
07-20-2009, 09:54 AM
Changing URL after every keypress?

Can I ask why you would want to that?

07-20-2009, 12:02 PM
i'm writing some ajax search engine and the url's are handled as follows:

http://localhost/search#q=<search term>

and i'd like to implement searching after every few keypresses so ideally the url should reflect the current query