Changeset 684:1c085f019602
- Timestamp:
- 10/06/09 15:22:08 (4 years ago)
- Author:
- tgambet
- Branch:
- default
- convert_revision:
- svn:cdcfb263-7567-472c-a848-e2c2df3466e7/trunk@685
- Message:
-
new setHash method which uses window.location.replace so that the root page is not recorded in the browser history. Works fine with ff3.5, should be tested further with other browsers
- Location:
- WebContent/scripts
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r616
|
r684
|
|
| 1 | | /* $Id: w3c_unicorn_index.js,v 1.13 2009-10-01 17:19:18 tgambet Exp $Id */ |
| | 1 | /* $Id: w3c_unicorn_index.js,v 1.14 2009-10-06 15:22:08 tgambet Exp $Id */ |
| 2 | 2 | var W3C = { |
| 3 | 3 | |
| … |
… |
|
| 341 | 341 | W3C.FakeForm.setProperty('action', '#' + hash).submit(); |
| 342 | 342 | } else { |
| 343 | | window.location.hash = '#' + hash; |
| | 343 | window.location.replace('#' + hash); |
| | 344 | //window.location.hash = '#' + hash; |
| 344 | 345 | } |
| 345 | 346 | } |
-
|
r629
|
r684
|
|
| 1 | | /* $Id: w3c_unicorn_results.js,v 1.16 2009-10-02 12:23:59 tgambet Exp $Id */ |
| | 1 | /* $Id: w3c_unicorn_results.js,v 1.17 2009-10-06 15:22:08 tgambet Exp $Id */ |
| 2 | 2 | var W3C = { |
| 3 | 3 | |
| 4 | 4 | start: function() { |
| 5 | 5 | |
| | 6 | document.addEvent('onHistoryChange') |
| | 7 | |
| 6 | 8 | W3C.Observers = $$('.observer'); |
| 7 | 9 | |
| … |
… |
|
| 31 | 33 | W3C.toggle(section); |
| 32 | 34 | }); |
| 33 | | |
| 34 | 35 | }); |
| 35 | 36 | |
| … |
… |
|
| 237 | 238 | W3C.FakeForm.setProperty('action', '#' + hash).submit(); |
| 238 | 239 | } else { |
| 239 | | window.location.hash = '#' + hash; |
| | 240 | window.location.replace('#' + hash); |
| 240 | 241 | } |
| 241 | 242 | } |
| … |
… |
|
| 244 | 245 | window.addEvent('domready', W3C.start); |
| 245 | 246 | |
| | 247 | window.addEvent('onbeforeunload', function () { |
| | 248 | console.log(history.toString()); |
| | 249 | history.go(-2); |
| | 250 | }); |
| | 251 | |