1

example.comにウェブサイトがあるとしましょう

「データベース」と「年」の2つのローカルビューが含まれています

最初に、データベースビューがロードされます。

ユーザーは「年」ビューに移動します。

アドレスバー(少なくともAndroid 2.3では)はexample.com#Yearと表示されるようになりました

次に、ユーザーは何らかの理由でページを更新することを決定します。

アドレスexample.com#Yearが更新され、ユーザーは空白の白い画面で迎えられます。

この状況に対処する方法について誰か提案がありますか?もちろん、ユーザーがどちらのビューを表示していても、更新された場合は表示したいと思います。

ありがとう!

アップデート:

これが私の問題を説明するのに役立ついくつかのコードです:

html:

<div data-role="view" id="Database">
    <div data-role="content">
        <p><strong>This is the Database view</strong></p>
        <a data-role="button" id="databaseButton" href="#Year">Go to Year View</a>
    </div>
</div>

<div data-role="view" id="Year">
    <div data-role="content">
        <p><strong>This is the Year view</strong></p>
        <a data-role="button" id="yearButton">Refresh Page</a>
    </div>
</div>​

脚本:

var app = new kendo.mobile.Application($(document).body, {
    initial: "Database"
});

$("#yearButton").click(function() {
    // location.reaload();
    // cannot simulate page refresh by the user in jsfiddle

    // the current browser address is example.com/index.html#Year
    // reloading this address produces a blank white screen
    // because of the #Year parameter
});

http://jsfiddle.net/VUN3g/16/

4

1 に答える 1

1

Kendo UI の最新リリース (2012.3.1114) と jQuery 1.8.2 を使用していることを確認できますか?

次の URL を使用して、コードと Android 2.3 でのテストで問題を再現できませんでした...

http://jsbin.com/aqireb/1

于 2013-01-03T20:06:13.407 に答える