JQuery的Ajax请求不工作的iPhone设备的浏览器 [英] JQuery Ajax request not working on iPhone device browser

查看:153
本文介绍了JQuery的Ajax请求不工作的iPhone设备的浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们都在广泛使用jQuery的AJAX调用从XML Web服务中提取数据开发一个iPhone的Web应用程序的过程。在开发和测试的Safari在我的Mac,来电做工精美。问题是,当我们测试的iPhone模拟器,或者在实际设备上,我们没有得到任何东西从web服务。

We are in the process of developing an iPhone web app using extensive jquery AJAX calls to extract data from an XML web service. When developing and testing on my Mac on Safari, the calls work beautifully. Problem is, as soon as we test on the iPhone emulator, or on the actual device, we are not getting anything back from the web service.

我已经变成了开发菜单上,改变了用户代理为移动Safari浏览器,看看是否有差别,但它仍然适用于物联网的PC端。

I have turned on the 'Develop' menu and changed the 'User Agent' to Mobile Safari to see if that makes a difference, but it still works on the PC side of things.

我不认为这是一个跨站点的限制,因为所有的Ajax调用等来自同一服务器和端口号进行。

I don't think it is a cross site restriction, as all the ajax calls etc. are made from the same server and port number.

有没有办法,我们可以做的仿真器JavaScript调试,看看那里的呼叫失败的原因?

Is there a way we can do javascript debugging on the emulator to see where the call is failing?

谢谢, 德万·奈尔

推荐答案

您可以启用移动Safari浏览器的JavaScript控制台。见说明书<一href="http://developer.apple.com/safari/library/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/2SafariDeveloperTools/SafariDeveloperTools.html#//apple_ref/doc/uid/TP40007874-CH3-SW4"相对=nofollow>此处。它基本上设置 - > Safari->开发技术>调试控制台。这适用于仿真器,和实际设备

You can enable the javascript console in Mobile Safari. See the instructions here. It's basically Settings->Safari->Developer->Debug Console. This works on the emulator, and the actual device.

这篇关于JQuery的Ajax请求不工作的iPhone设备的浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆