changing URL via AJAX using wicket

Is there a way to make an AJAX call alter the current page URL without redirecting or reloading the page, in Apache Wicket? For example, say we are in the url:localhost:8080/someUrlI’d like that when I click an ajax link, some action is performed, and the url changes to, say:localhost:8080/otherUrlwithout redirecting, just changing the url displayed …

via Java Application Development Tutorial » Search Results » ajax:

changing URL via AJAX using wicket

Is there a way to make an AJAX call alter the current page URL without redirecting or reloading the page, in Apache Wicket?
For example, say we are in the url:
localhost:8080/someUrlI’d like that when I click an ajax link, some action is performed, and the url changes to, say:
localhost:8080/otherUrlwithout redirecting, just changing the url displayed in the browser. Is this even possible?
Thanks!
Manuel
……………………………..

The only part of the url you can change with javascript is the hash
You could change localhost:8080/#/someUrl to localhost:8080/#/otherUrl
Do this with window.location.hash
Here’s an example of a flash site which uses this concept to allow for deep-linking URL’s: http://www.2advanced.com
……………………………..

Actually you can ! But this is not related to Wicket at all. This is what the new History API in HTML5 is about. Just search for “html5 History API example” in Google and enjoy.
……………………………..

No, it isn’t. If you change the location in the browser, a new request is made to that URL.
(You do that with window.location.href = newUrl, but the page reloads)

For more info: changing URL via AJAX using wicket

Java Application Development Tutorial » Search Results » ajax

changing URL via AJAX using wicket

Share this post:

Related Posts

Leave a Comment