JQuery的Ajax请求不工作的iPhone设备的浏览器浏览器、设备、工作、JQuery

由网友(前世有约今生无缘)分享简介:我们都在广泛使用jQuery的AJAX调用从XML Web服务中提取数据开发一个iPhone的Web应用程序的过程。在开发和测试的Safari在我的Mac,来电做工精美。问题是,当我们测试的iPhone模拟器,或者在实际设备上,我们没有得到任何东西从web服务。We are in the process of dev...

我们都在广泛使用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控制台。见说明书此处。它基本上设置 - > 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.

阅读全文

相关推荐

最新文章