发布形式在Android浏览器隐藏的iframe [英] Posting form to a hidden iframe in Android browser

查看:218
本文介绍了发布形式在Android浏览器隐藏的iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只注意到那保持在PC浏览器工作的事情之一,不会在Android浏览器。

I just noticed that one of the things that keep working in browsers on PC, does not work on an Android browser.

我要发布一个表单,一个隐藏的iframe。这基本上是验证用户凭据后启动文件下载。

I want to POST a form to a hidden iframe. This is basically to initiate a file download after verifying user credentials.

<form method="post" action='/downloader.php' target="hiddenframe">
    ....
    ......
    ...
    <input type="submit" value="Download">
</form>

<iframe name="hiddenframe" style="display:none;"></iframe>

这不会在Android浏览器。我想我应该关心的iframe的。我应该照顾我或者有什么替代方案,使这项工作?

This doesn't work on Android browsers. I suppose I should be concerned of the iframe. What should I take care of or what alternatives I have to make this work?

感谢您的任何见解。

推荐答案

我不知道的Andr​​oid如何处理框架,再加上不同的Andr​​oid ROM的使用不同的浏览器。

I don't know how Android handles frames, plus different Android roms use different browsers.

我所知道的是,随着HTML5的帧pcated德$ P $,所以不是一个很好的做法。如果没有任何你将不得不在未来的新浏览器越来越多的兼容性问题。

What I do know is that as of HTML5 frames are deprecated, therefore not a very good practise. If not anything you are going to have more and more compatibility issues with new browsers in the future.

你为什么不这样做在同一页上的要求?如果do​​wnloader.php具有适当的接头连接器的下载过程应该开始而不断裂或根本改变当前页面。

Why don't you do the request on the same page? If the downloader.php has the proper headers the download process should start without breaking or changing the current page at all.

这篇关于发布形式在Android浏览器隐藏的iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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