| Page 1 of 1 | [ 3 posts ] |
|
Recently...as in 2 days ago...decided to switch to YUI from jQuery. Everything is working great, but I have a small question.
Is there a quick and not so dirty way to force the Browser History widget to remove anything from location.href - that isn't either the base location or the hash - from the display but not from the history? ie... Search form executes.... Code: http://www.mydomain.com/pages/?what=something&where=somethingelse is displayed. Then the user click somewhere that is hooked into the browser history widget and they're sent to... Code: http://www.mydomain.com/pages/?what=something&where=somethingelse#nav=home I want this displayed as... Code: http://www.mydomain.com/pages/#nav=home without a cookie or a double page load or switching to a POST form. YAHOO.util.History.getQueryStringParameter only lets me intercept the hash and I'm not seeing anything that exposes the location.href without getting inside the widget itself. Can anyone point me in the right direction? Thanks, matt |
|
Unfortunately, changing any part of window.location other than window.location.hash will cause the browser to make a new request for the changed URL, so it's not currently possible to accomplish what you want.
The new HTML5 History API adds the ability to change the displayed URL without causing a new request. I plan to add support for the HTML5 History API in YUI 3.2.0, but browser support is currently slim; as far as I know, it's only supported in Firefox 3.7 and recent Chrome dev builds. |
|
Thanks for the quick answer. After reading it, I reworked the form and its related code, changing it to use POST. That took care of the issue. Wasn't intending to come across as lazy, just trying to get my arms completely around YUI since I've been on jQuery so long. Thanks again.
matt |
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group