开发者

What does the MS Ajax Framework use location.hash for?

I've noticed that the MS ajax framework touches the action of the default form during Sys.Application.initialize, appending location.hash to it. This is interfering with other code in my app that expects different behaviour.

开发者_运维技巧

What does the framework do with that? It refers to the values it puts on the hash as 'state', but how do I find out what it's communicating and from where?


Probably for back/forward browser navigation support. When you navigate inside ajax application you can switch forms/pages without actually leaving your page, i.e. address in browser address bar does not change. In this scenario back and forward buttons does not work as user expects it. Common solution to this problem is changing hash part of the url from javascript and tracking when this hash is changed as a result of user pressing back/forward buttons to show the form required by user.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜