Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/428.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 除非我刷新,否则不会加载Jquery移动页面_Javascript_Html_Ajax_Google App Engine - Fatal编程技术网

Javascript 除非我刷新,否则不会加载Jquery移动页面

Javascript 除非我刷新,否则不会加载Jquery移动页面,javascript,html,ajax,google-app-engine,Javascript,Html,Ajax,Google App Engine,我成功地将我的应用程序上载到Google app Engine,但是当我想要从页面执行操作时,除非我手动刷新页面,否则它不会工作 这是我混乱的项目结构: index.html文件(称为/main)是加载的第一个页面,该文件位于templates目录中。所有其他文件(html和.js)位于名为html的单独目录中。意识到这可能是原因,我在index.html文件中添加了以下脚本: <script src="/html/js/registration.js"></script

我成功地将我的应用程序上载到Google app Engine,但是当我想要从页面执行操作时,除非我手动刷新页面,否则它不会工作

这是我混乱的项目结构:

index.html
文件(称为
/main
)是加载的第一个页面,该文件位于
templates
目录中。所有其他文件(html和.js)位于名为
html
的单独目录中。意识到这可能是原因,我在index.html文件中添加了以下脚本:

  <script src="/html/js/registration.js"></script>
  <script src="/html/js/profile-page.js"></script>
index.html:

<!DOCTYPE html>
 <html>
<head lang="en">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="content-type">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="/html/js/jquery.js"></script>
<link href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css"/>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>
<script src="/html/js/jquery.mobile.js"></script>
<script src="/html/js/profile-page.js"></script>
<script src="/html/js/team-members-view.js"></script>
<script src="/html/js/view-teams.js"></script>
<script src="/html/js/registration.js"></script>
<script src="/html/js/daily-activities.js"></script>
<script src="/html/js/choose-team.js"></script>


<title></title>
</head>
<body>

<div data-role="page" id="home">
<div data-role="header" data-theme="b">
    <h1> Home </h1>
</div>
<div data-role="content">
    <img src="/html/images/logo.jpg" width="450" height="300"/>
    <ul data-role="listview" data-theme="b" data-inset="true">
        <li><a href="/html/registration-page.html" id="home-to-reg-button">Click your      to register</a></li>
        <li><a href="/html/profile-page.html">View Your Profile</a></li>
    </ul>
</div>
<div data-role="footer" data-position="fixed" data-theme="b">
    <h3>&#169; </h3>
</div>
</div>
</body>
</html>
class MainHandler(webapp2.RequestHandler):
def get(self):
    self.response.out.write(template.render('templates/index.html', {}))

app = webapp2.WSGIApplication([

('/', MainHandler),
('/uploadNewMember', MemberRegistrationHandler),
('/profileView', MemberDetailsHandler)
 ], debug=True)

如果看不到app.yaml,可能还看不到主处理程序和index.html,目录结构就不会告诉我们什么。至少是重要的部分。嗨@TimHoffman,我刚刚更新了问题以显示这些。如果您在浏览器中查看开发人员控制台,您是否看到任何“404-未找到”的?或者,在你发布后,你能刷新页面,看看它是否显示出来吗?这可能是一个最终的一致性问题,即需要几秒钟才能发布到数据存储,而页面重新加载太快,无法找到它。发布,等待,刷新。是吗?除非我刷新我访问的每一个页面,否则就不会与数据存储进行任何通信。我仍然不明白你到底在说什么。你是说如果你去mysite.com/(一个GET),并在表单(一个POST)中输入数据,那么数据不会得到处理?但是,如果你去mysite.com/然后点击刷新(另一个GET),然后输入数据,它是否按设计工作?你的邮局管理员在哪里?
class MainHandler(webapp2.RequestHandler):
def get(self):
    self.response.out.write(template.render('templates/index.html', {}))

app = webapp2.WSGIApplication([

('/', MainHandler),
('/uploadNewMember', MemberRegistrationHandler),
('/profileView', MemberDetailsHandler)
 ], debug=True)