Iphone UIWebView not working on javascript buttons - javascript

I want to try load a private webpage in uiwebview.
When I try to open it from the native Safari app on my iPhone, everything works well.
But when I try to open in uiwebvie, the buttons on the webpage doesn't work.
Buttons are as follows
<a class="actionButtonWithoutImg" href="javascript:__doPostBack('','')">Edit</a>
Do you have any idea ?

Related

Opening external application in iframe not working in Safari

I have a site embedded in an iframe from where I want to launch a mobile app. The following is bound to an onClick action on my button, and works in both Chrome and Firefox on my Android:
window.location = "scheme://app.com/?action=xxxxx"
However, when trying on Safari on iOS, nothing happens at all when clicking the button. If i go to the site directly (instead of iframing it) it works perfectly.
The same thing happens if I use an anchor tag:
I tried to fix this by using window.top.location, but then I run into Same-origin policy issues. The site that is hosting the iframe is on a different domain which I can't control.
Is there a workaround for this?

Iphone Not responding when setting webapp to homescreen

So ihave created a webapp that opens up camera/upload file on user mobile. This has proved work on Ipad and android system. But when it comes to iphone(5c IOS 10.) it does not respond. This is the javascript script that i am using to open the file input dialog
document.getElementById('input').click();
here is Demo
Sample App - Add to Homescreen to test, it works if i click choose file, but seems not to work on click custom button, Please let me know if this does work on your iphone when set to homescreen

Window.print() and cloud printing

My application is developed in ASP.NET
In one of my pages(productinfo.aspx) I have a HTML button named & labelled
as print. I am handling the click of this button in java script like
below.
$('#print').click(function($)
{
window.print();
});
The above is working fine in all browsers on PC and in smartphones as well
except Google Nexus mobiles and tablets. It is working in other android
mobiles like Samsung and Sony experia etc..
I came to know that window.print is not supported in Google android and I
should use Google cloud print based on the following link.
https://developers.google.com/cloud-print/docs/gadget
But this requires the user to be logged into to GCP with their Google ID.
But my requirement is like the device will be not connected to Internet
and it should provide the print as dialog as like in other devices.
Note:
In Android chrome browsers there is a print command in the browsers menu
clicking on that is showing the print dialog without any GCP.
Is it possible to invoke the browsers menu command through java script,
I tired simulating (ctrl+p) key press event on the button click assuming
that it will trigger the browser's print command it too didn't work.
It would be very much helpful if any one can help me with a solution for
this issue.

HTML Code to display UIAlertView on iOS

I've gone to different websites on my iPhone that will pop up a UIAlertView when it loads. How is this accomplished? I want to put some code on my page to pop up a UIAlertView when viewed on an iPhone.
You can make use of bridecall from the js to native code to trigger the UIAlertView..

Problem with opening URL in popup with Safari Mobile on iPhone. Ignoring parameters

I'm building a web application (based on Phonegap) optimized for iPhone.
I have to integrate a popup which will open our twitter page and shouldn't fit to entire screen (for a simple navigation problem..how do a user should go back at full screen??).
I've noticed that Safari Mobile opens correctly the new page but ignores my window.load width/height parameters.
This is the incriminated js code :
var twitterLink=$("#twitter a");
var url="http://mobile.twitter.com/test";
twitterLink.click(function(){
window.open(url,'name','(height=200),(width=150)');
return false;
});
I've just tried all other browsers on leopard and work!
My aim was embedding a Twitter Profile Page in the fastest way in a page of my app (which has a navigation bottom bar).
This morning I've tried with IFRAME , but with no luck...are not supported..
Then i've tried with the new Twitter intent but has the same problem as here in safari Mobile (ignoring parameters of popup)
Thanks a lot!!!
I think that's a known bug of Mobile Safari.
By my knowledge window.open accepts parameters without parentheses, so:
window.open(url,'name','height=200,width=150');
this should work.

Categories