I am creating an iPad app, using HTML5 and PhoneGap. I am wanting to put an iframe into a page and pull through some content in a php page found remotely on our server.
I have set the correct ExternalHost in the PhoneGap.plist file so that it will accept the external domain.
If I tell the iframe to access a .html page (on the server), it works perfectly - However if I change the extension to .php I get a blank iframe.
This is all while testing the app directly on the iPad and the IOS Simulator.
Could anyone suggest anything I have missed out?
Related
I am working with Safari web app for iDevice. I got the configuration right from Configuring Web Applications and it went well without any issues. In my web app, there is a link for logging out the web page that requires to redirecting the webpage. The problem is when it redirects, it opens Safari app instead of redirecting in the web app. It's not like Google Chrome on Android device, it works well.
I solved it by using javascript to redirecting instead of using a tag.
I am making a web application using ASP.NET and I noticed that only Internet Explorer loads images properly that are on my home computer (../Desktop/WebsiteImages/xxxx.jpg), whereas the images won't load on Chrome or Firefox. If I want the images to display on Google Chrome or Firefox, I have to upload the images on a web hosting site such as imgur instead of having them all on a file on my computer. Is this a known bug?
If I want the images to display on Google Chrome or Firefox, I have to
upload the images on a web hosting site such as imgur instead of
having them all on a file on my computer. Is this a known bug?
It is not a bug.
Web Server will never serve a file which is located outside of a web application (unless you create an image handler by yourself).
If you are new to web application, easiest way is to place images inside ~/images/ folder inside your ASP.Net application.
Then you can call the image like this -
<img src="#Url.Content("~/Images/MyImage.jpg")" alt="My Image"/>
showing local file like file:// is not allowed in Chrome and Firefox for security reasons by default, but this answer shows you how to change those settings. it's not recommended to use local filepath for your image
I have a simple cordova app with this is my config.xml:
< content src="http://example.com" />
In other words, the app simply loads an website.
The problem is that this website has some hrefs with target="_blank" but the webview doesn't open the default browser when the link is clicked/tapped; the link is loaded inside the webview.
I know that there's the InAppBrowser plugin, but i think I cannot use it with this approach (the hosted webpage would not load the plugin).
Does anyone know how to deal with this? Any recommendation?
I want to open up a pdf page on a web page on click of an icon and I want that page to be opened on the same page. I tried to use - pdf.js, but I am facing problem in running helloworld of pdf.js. So how do I use odf.js locally?
Link referred: https://github.com/mozilla/pdf.js/tree/master/examples/helloworld
Thanks
Probably not the issue you are experiencing but you will want to turn off web workers if you're using PDF.JS in multiple instances on the same page.
PDFJS.disableWorker = true;
it does not work with file://, you need to upload the files to your webserver, because AJAX just works with a webserver and not on the clientside
Is there any way to communicate between my .exe application and Firefox?
Because, I have my own webpage. I'm using FireFox to browse it.
I have an application (in c++) to process a piece of HTML code from my webpage within FireFox. My application can print something directly to printer (raw print).
Since now, I coudn't access firefox's DOM content (page HTML source) from outside firefox; Also, I coudn't print directly to printer (raw print) from firefox.
Now, I'm looking solution for this problem. Here are my possibilities:
1.) My web page I can copy my related text to clipboard.
2.) My web page I can write my related text to Firefox's cookie.
3.) My web page I can write my related text to a file from client's PC.
4.) Any other way to send my related text to my .exe application.
But I don't know how can I do:
How can I copy to clipboard within firefox,
How can I read FireFox's cookie from my .exe application,
How can I create file in client's PC.
Is there any way to communicate between my .exe application (in c++) and Firefox?
You have to write an extension for firefox an use its API. For example see nsIProcess:
"The nsIProcess interface represents an executable process."
Assuming that your page has a true URL outside of FireFox, you could solve your problem by registering a custom protocol handler. E.g. register "X-myprettyprinter". Then, in FireFox, from http://www.example.com/index.html you can redirect to X-myprettyprinter:http%2D%2Dwww.example.com/index.html. FireFox doesn't know how to handle the X-myprettyprinter protocol so it hands off the URL to the OS, which then hands it to your registered application. Bonus: it works for all browsers. Downside: you have to retrieve the URL yourself and render the page again in-process
You could write an addon for firefox that allowed some form of integration with your application.
Here is a tutorial on writing firefox addins.
The best way to do this is to skip the .exe application and just make an ad on for FireFox, Take a look at the FireBug ad-on. It can pull certain codes out of a web page, If you use the API I bet you could do what your .exe program should.