Jquery-mobile messes up css background images on the iphone browser and UIWebView - iphone

When I add the jquery-mobile javascript to my site some of the background css images fail to load until I go to a different page and come back to the home page.
<script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
The second I delete the import line, the images load fine. What might be the issue?
This issue only appears on the ios safari browser and a UIWebView. Works fine in a PC browser.

Seems like it was a jquery-mobile bug. Switching to the latest beta version did the trick for me:
<script src="http://code.jquery.com/mobile/1.2.0-beta.1/jquery.mobile-1.2.0-beta.1.min.js"></script>

Related

Flutter webview is not showing image even thou it's so simple html

I am making a Flutter app, and I am using webview here.
It all goes fine but when it comes to image, it just fails.
Other text contents are all fine.
I tried several things but all failed.
You can replicate the test by this url
It appears fine from the browser but images never appaer only in flutter webview
This is my flutter code for the webview
I found the answer by myself. It was because the image source was referred as "http:". I just put the following tag and it solved like a charm

WKWebView does not load http URL in iOS 10 and above, html pages are not rendered

I am trying to load a http URL in WKWebView, the page loads perfectly fine on enabling NSAllowsArbitraryLoads and NSAllowsArbitraryLoadsInWebContent in info.plist file. But during navigating the Application, html pages are not loaded completely and my custom spinner doesn't disappear.
I have tried to NSExceptionDomains but no luck.
Everything works fine when I tried to load url with https://myurl
Please suggest
I found answer to my above question
history.back() was not working on HTML back button in iOS 11. Adding history.go(-1) worked for me.

what's happens with transition pages in iPhone

why i having a problem in the iPhone but android work good
problem usually occurs between the pages in IOS
for example :
when go to other page usually go and back in the same time without click the back button .
You should use the fix recommended by Ionic team:
https://gist.github.com/IgorMinar/863acd413e3925bf282c
Place downloaded file into www/js folder.
Add script tag in index.html: <script src="js/ngIOS9UIWebViewPatch.js"></script>
Add new dependency in app.js: angular.module('myApp', ['ngRoute', 'ngIOS9UIWebViewPatch'])
More info about that bug: http://blog.ionic.io/preparing-for-ios-9/

jQuery Mobile sprites not displaying when css included as a local resource in a UIWebView on iPhone

On the iPhone I'm using a UIWebView to display some content that is stored on the device so my content can be viewed on the device when there is no internet connection. I'm using the jQuery and mobile stuff in an attempt to create web apps and mobile apps that use one code base.
When I include:
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" />
everything works fine, the sprites that make up the back button, home icon etc. all work fine. When I include the above as a local resource such as:
<link rel="stylesheet" href="jquery.mobile-1.0a4.1.min.css" />
The sprites do not display, I just get a dark circle where the sprite should appear. All the other attributes defined in the css work fine, just not the sprites. If I misname the local resource, everything is messed up, so I know the css as a local resource is being included, but it is being handled differently as a local resource vs a remote resource. It even works if I hit the local dev box running apache... so it must have something to do with how the web server is serving the page vs. including it as a file......
I played around with loading the same page twice with separate UIWebViews in an attempt to see if there is some timing issue... since a local resource would load much quicker than a remote resource. The second instance of the UIWebView loaded it correctly. Is there a $.mobile command I can call to refresh the page, or for the library to do it's magic?
any ideas?
thanks for any help
Question was answered in the jQuery forum. Funny, the answer was related to my comments above, and I still didn't think to look at the image files! palm2forehead
had to go in the jquery mobile css file and remove the references to the "images" directory. IOS doesn't handle directories like normal systems so once I did that all was ok.
It did not solve my issue chaning the path.
I had to look up in the mobile.css, i found that the icon were first set with an image, an then moved with classes, i had to set the the full background property on the classes that moved the background image.
Like so:
.ui-icon-plus {
background:#9c9c9c url(icons-18-white.png) no-repeat 0 50%; }
Old way were:
.ui-icon-plus {
background-position:-0 50%;}
Put everything (js,css) to www folder along with index.html file, and include file like this <script src="jquery-mobile-min.js">`, it has solved my problem.

No response after submitting form on iPad from UIWebView

I am currently opening a webpage in UIWebView and submitting a form which performs a query on the server side and youtube video is returned (if available). I have no say/control over the server side implementation.
This webview works fine on iPhone/iPod, however, when I try to run the same app on iPad there is no response after submitting the form.
I created a dummy app, compiled on iOS 3.2 and problem is still there.
I put NSLogs in webview delegate methods which shows that after the form is submitted (UIWebViewNavigationTypeFormSubmitted) nothing happens.
I'm unable to figure out why this happens only on iPad and not on iPhone/iPod Touch.
I have created the webview in IB and setting the URL is viewDidLoad
[viewTourWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:#"http://www.realestatetour.com/mobiletours.htm"]]];
The URL for reference is http://www.realestatetour.com/mobiletours.htm
Enter the Tour ID as 10.
Thanks
The reason it wasn't working is because the form opens the result in a new page, (i.e. _blank) and apparantly all links opening in new window are ignored by uiwebview and its delegates.
I found 2 possible solutions for this:
1) Modifying the html using javascript to replace all _blank with _self for all anchor tags.
(source)
2) A more elegant solution which works for handling links which open a new window.
(source)
In my case i recreated the web page displaying form on the iphone app and changed _blank to _self.