My solution is to put a <link> tag on every page with a reference to the home page URL. That way scripts can always build URLs based on the home page root.
For example: BasePage.html <head> <link rel="home" wicket:id="home-link" /> </head> BasePage.java add(new BookmarkablePageLink("home-link", getApplication().getHomePage())); Then your JavaScript can do something like this (jQuery): var projectPageUrl = $("link[rel='home']").attr("href") + "project/" + projectId; -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Calculating-wicket-page-URL-in-JavaScript-tp3262459p3263084.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org