Posting form to a hidden iframe in Android browser - android

I just noticed that one of the things that keep working in browsers on PC, does not work on an Android browser.
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>
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?
Thank you for any insight.

check this notes about using iframe in Android:
dose apple and Android Browsers support Iframe??
I hope this helps you.

I don't know how Android handles frames, plus different Android roms use different browsers.
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.
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.

Related

In Firefox for Android not a single link clicks, it only highlights in grey

If you go on my site on Firefox for Android (either a mobile or a tablet) the links either in the menu, or anywhere else for that matter refuse to click, they only highlight in grey as if they're active, but don't actually do anything.
It works fine in Chrome for Android...I can't figure this one out. Help greatly appreciated.
The site is built in Wordpress
Total Lawn Care link
There seems to be a missing closing </div> tag in the html. I think the div <div class="gwrapper"> is the one causing the problem. Chrome is smart enough to "guess" where things should be closed and still work correctly but firefox has more strict of standards.
try modifying the html and add the </div> where you think it needs to be.
you can go to W3C validator.org
to check for errors in your html. I used an editor like Webstorm to help track the problems.
I hope this helps!

Phonegap disable x-frame-option in webview

i have a problem that is when i open a site like facebook.com in iframe in my phonegap app don't open because x-frame-option.
my question is can i disable checking x-frame-option from java code of cordova webview ?
or use another webview in the same activity one it top and on at down and change the url of webview ?
i'm not good on phonegap and not good in android please help me :D
Thanks all
I found the great solution in this amazing plugin
https://github.com/Wizcorp/phonegap-plugin-wizViewManager
you can add a webview to android and ios and select it position it's really great.
I would assume it isn't possible to allow it on Cordova because it is up to web view of device to handle. What you probably could do is to first download the HTML for some page with AJAX query, strip the
<meta http-equiv="X-Frame-Options" content="DENY" />
of from there and then inject the whole content into iframe. Of course this only works for single page but if that is SPA (single-page application), it might even be enough.

Stripe Checkout not working on phone browers, desktop browers fine

I've got stripe working fine on my webpage but once I go on the webpage with my Android phone browser and try to checkout it gives me an error saying "The payment couldn't be completed because the original page seems to no longer be open. Close your tabs and try again.." I think it has something to do with the fact that on phone browsers the stripe Checkout form opens up in a new tab whereas on desktops it opens in a modal...
anyone ever experience this?
There was a similar problem with regards to the OAuth flow on mobile devices: https://groups.google.com/forum/#!topic/meteor-talk/8B1kjjvRimE
It seems to be a limitation with how mobile browsers are implemented so there's not much that can be done on that side. I think the best (only?) option is to integrate your checkout form into the page instead of in a popup. Not sure if Stripe offers this functionality but they probably do and if not, I'm sure there are other payment processors that do.
I emailed them and got it fixed. The thing to look out for is importing a download of checkout on your own server rather than just using the link they provide. For example, use:
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="YOUR_KEY"
data-amount="2000"
data-name="Pay"
data-description="Pay $20.00"
data-image="myimg.png">
</script>
instead of something like:
<script
src="/files/checkout.js" class="stripe-button"
data-key="YOUR_KEY"
data-amount="2000"
data-name="Pay"
data-description="Pay $20.00"
data-image="myimg.png">
</script>
Not entirely sure what I may have done in my server file to cause the error, but this change fixed it, so hopefully that helps!

Loading Chrome Android Intents from an iframe

I'm trying to use Chrome's new Intent:// structure, and I've determined these intent URLs don't resolve when inside an iframe.
For example:
iframe.html
Take a QR code
test.html
<iframe src="iframe.html" width="300px" height="300px"> </iframe>
When you click on the link, you'll get a 302 UNKNOWN_URL_SCHEME within the iframe. This happens both Chrome and Chrome Beta.
Is there any plan to support this use case? What is the reasoning behind this design choice? Is there any way I can load an intent from an iframe?
Thanks,
https://developers.google.com/chrome/mobile/docs/intents
Quick answer: No, it is a potential security risk.
I have replicated the three ways developers used it here http://jsbin.com/ozecok/latest (all fail)
Intents are the officially supported way to launch Android applications from the web and you have to do that either via a user gesture in the host page (not an iframe) or via a redirect to the intent syntax.
Try to add target="_blank" in your link tag, this worked for me.

is it possible to use html code in android?

i would like to add a widget that i found from a website into my android app.is that possible?this is the code,as i get it from the site:
<iframe src="http://www.mykosmos.gr/loc_mk/wforecast_widget.asp?city_code=0032&bcolor=F0F0F0&fcolor=000000&font=Trebuchet MS&pos=hor" frameborder="0" height="180" width="430" marginheight="0" marginwidth="0"></iframe>
If all you want to do is show the html response as part of your View, not having the user able to interact with it and not needing any javascript to run, then I think the Android WebView would give you what you need.
It allows you to embed the rendered page into a standard Android layout, but does not allow any interaction with the content.
Check out the API docs for android.webkit.WebView Note that the first answer confuses WebView with launching the Web browser via an intent. WebViews allow embedding.

Categories

Resources