与 ASPX 页面交互时,UIWebview 不像本机 iPhone 浏览器那样工作
我对 iPhone 开发相当陌生,我一直在尝试创建一个指向 ASPX 网页的“包装器”应用程序。在我的 UIWebview 中,网页加载没有任何问题,用户可以从两个下拉框中选择项目。
这里的问题是,一旦用户从下拉菜单中选择一个项目,页面应该刷新以反映所选的值。这在我的 webview 中不会发生,但在我的 iphone 上的 Safari 中可以正常工作。
以下是该网页的链接,以便您了解我在说什么:此处
我的问题是。 uiwebview 和本机浏览器之间有哪些差异会影响运行 JS 或 ASPX 或其他网页内容以及如何解决此问题?
感谢您的帮助!
I am fairly new to iphone development and I've been trying to create a "wrapper" app that points to a ASPX webpage. The webpage loads without any issues in my UIWebview and the user can select items from two dropdown boxes.
The issue here is that once the user selects an item from the dropdown menu, the page should refresh to reflect the selected value. This does not happen in my webview but works correctly in Safari on my iphone.
Here's the link to the webpage so you can see what I'm talking about: here
My question is.. what are the differences between a uiwebview and the native browser which affect running JS or ASPX or other webpage contents AND how do I fix this issue?
Thanks for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Safari 和 UIWebView 发送的用户代理不同,因此您的问题可能与此相关: UIWebview 和 iPhone 内容不回发(ASP.NET 浏览器功能问题)
The user agents sent by Safari and UIWebView are different, so your problem might be related to this: UIWebview and IPhone content does not postback (ASP.NET Browser Capability issues)
只是为了让其他人了解最新情况,我能找到的有关此问题的唯一答案位于:
http:// www.tuaw.com/2011/03/18/apple-confirms-some-webkit-optimizations-unavailable-to-ios-apps/
和
http://drnicwilliams。 com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/
显然苹果限制了用户在 uiwebview 上可以做的事情与 Safari Mobile 浏览器相对。另外,第二个链接说JS是单向的。如果有人能解决我的问题,我将不胜感激!
Just to keep others updated, the only answers I could find regarding this issue is found on:
http://www.tuaw.com/2011/03/18/apple-confirms-some-webkit-optimizations-unavailable-to-ios-apps/
AND
http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/
Apparently Apple limits what users can do on a uiwebview as opposed to the Safari Mobile browser. Also, the second link says that JS is one directional. If anyone has a work around to my problem, it would be greatly appreciated!!