Origin null is not allowed from Control-Allowed-Origin when use jquery header link button

↘锁芯ラ 提交于 2019-12-25 02:27:26

问题


I want to only change page with jquery mobile/cordova on android phone. My simple codes:

<div data-role="header" data-position="fixed">
        <h1>Event List</h1>
        <a href="options.html" data-icon="gear" class="ui-btn-right">Options</a>
</div>

If I click options button,"Error loading page" looks for few seconds.Logcat:

XMLHttpRequest cannot load file:///C:/Users/btstajer/Desktop/workspace/Fetcher/assets/www/options.html. Received an invalid response. Origin 'null' is therefore not allowed access.

Hey I found problem.Due to the jquery version differences. Such as: If jquery-2.1.1.min.js the above does not work.

<script type="text/javascript" charset="utf-8" src="js/jquery-2.1.1.min.js"></script>
<script src="js/jquery.mobile-1.4.3.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.mobile-1.4.3.min.js"></script>

does not work. But If jquery-2.1.1.min.js bottom,work but such is not seen its css file.

<script src="js/jquery.mobile-1.4.3.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.mobile-1.4.3.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery-2.1.1.min.js"></script>

What's the matter?? If I use jquery-1.8.3.min.js work fine but I need this version.help me And I tried on Chrome and Firefox.Chrome gave the same error.But firefox worked succesfully.Any ideas? thanks..

来源:https://stackoverflow.com/questions/24758847/origin-null-is-not-allowed-from-control-allowed-origin-when-use-jquery-header-li

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!