Unable to open HTML href link in Safari/iPhone - iphone

I have created a simple application using Phonegap in XCode using HTML. My code looks like this:
<dd>Office Number</dd>
<dd>Personal Number</dd>
<dd>Log in to your Mail ID</dd>
The first two links are working fine. I am able to dial a number; but the last line is not working. It seems like disabled. In the mobile, after running, it's showing "Log in to your Mail ID" as a tab but nothing happens when I click it.The web address is not going to the Safari browser.
Please help. how can I integrate this link to Safari browser in iPhone like the first two lines.
Thanks in advance

u have to implement child browser in ur application......https://github.com/purplecabbage/phonegap-plugins/tree/master/iPhone/ChildBrowser
it have a option of opening the link in safari also .....if u have any query plz feel free to ask .....

Related

Facebook tab not working in IE, works on website URL

I've created this facebook tab, and for some reason it will not work in IE once implemented into facebook. It DOES work on the website url where it is placed. The url is: https://www.enterprisebanking.com/assets/fb-products/
The tab works great in every browser except for IE. In IE, the entire middle section is missing and the tabs are unable to be clicked on.
Here's a screenshot of how the tab looks in IE: http://grab.by/s9Qu
Any advice is appreciated.
Dan
You have a console.log in https://www.enterprisebanking.com/assets/fb-products/js/tabs.js this will cause it to break in IE.

Open link in browser or open app

I have made an iphone app. The app calls the webpage and displays the content. Server side coding is in php. The problem is I have several links in the webpage. When I click on the link in the webpage it opens the entire page and I am no longer able to go back to where I was.
I tried iframe but not all the website support it like google, facebook. What I am looking is someway to open the link in browser or launch the another app, like the app of facebook. I have quite thoroughly searched for the solution without much luck.
Any pointers would be greatly appreciated.
Thanks
To implement navigation for UIWebView you can do the following: create two buttons, one for going forward in history and one for going back. And here is the code for that buttons you must include:
//For going forward
if (yourWebView.canGoForward)
{
yourWebView.goForward();
}
//For going back
if (yourWebView.canGoBack)
{
yourWebView.goBack();
}

Open iPhone App from an Email Link

I've working on a program where an email is sent to a user, and a link to open the iPhone app is embedded in the email. The problem is that when the user clicks the link to open the app, mail has stripped out the colon, so the link no longer works!
The link being created basically looks like this:
#"<BR><BR><BR>Open App"
But the link, when clicked in the email, opens this in the browser instead:
myApp//
with no colon, so the app doesn't launch and the browser says it can't find the page.
Any ideas how to fix this? Thanks!
It just should be:
#"<BR><BR><BR>Open App"
As a workaround for custom urls being blocked by gmail, what you could do is set up something like http://myapp.mydomain.com/ up do redirect to myapp://... That way it'll look like a normal domain but open your app. On the plus you will be able to see how many people click your link, though on the down side it'll pop via Safari first.
Add 'http:' to all your images and urls, iphones dont recognize links w/o that. also use single quotes for them(').eg.
<a href='http://xyz.com'></a><img src='http://xyz.com/pqr/abc.jpg'></img>

How to put a like box/button on a Dreamweaver MX v6.0 designed site?

Basically i'd like to put a like button on the website so that fans of the site can like the websites Facebook page.
The Like button page doesn't give me the code when i click the button, just says "Only verified developers can be added as listed developers of this application. Read www.facebook.com/help/?faq=17580 for details." Is this a common error, or?
EDIT: Using Like box now, but would prefer Like button.
And the like box page gives me the iframe and XFBML codes. Sorry for being a n00b, but how do i add either one onto my site? I've tried Insert > Script and pasted it in there, using all four script types (Javascript, JS 1.1, JS 1.2 and VBScript but they don't show in the preview. Placed the code under the 'back to top' button at the bottom of the page. Not showing up when i look at code view of the online version though?
Hopefully its something really easy and obvious, but any help would be great.
Again, site is designed/updated with Dreamweaver MX 6.0.
I dont have that much experience with Dreamweaver - but implementing the facebook social plugins (eg. Like button) is very simple. All you have to do is copy and paste the XFMBL you generate from this link. Once you paste your URL into the "URL to Like" field and click "get code" you should get the correct code to use...
You place this code wherever you want it to appear - if you want the like button to be in the footer just paste it there...
The code snippet actually loads the facebook javascript sdk and places your like button inside an iframe on your page...
You can not place the like button code inside a different element - if that were possible people could trick you into liking their page by writing some different label on the button - eg. "Back to top" :)
This should be relatively simple to implement. If you are still having dificulties - why not try opening a new HTML file containing only the required HTML tags and the like button code...
Hope this helps!
Good luck!
The error appears because, just like it says in the message, you are not a verified developer.
In order to be a verified Facebook developer, you need a verified Facebook account, with a credit card or a phone number verification.
I'd suggest you verify your account as soon as you can if you plan to use more of Facebook's plugins and apps, since it will give you full access to their developer tools

Error when using mailto: link in Mobile Safari in app-capable mode

I've got a form in a web page with an action that is "mailto:email" (where email is a real email address). When I load this page in Mobile Safari in regular mode (ie, not launched from home screen with app-capable mode), this works fine - after I submit the form, the email app comes up. However, when I'm in app-capable mode and have launched from the home screen (so, no Safari chrome), and submit the form I get the error "URL can't be shown". However, a regular mailto: link (ie, not in a form) does work when in app-capable mode.
Has anyone else noticed this? Any workarounds? Are forms disallowed in app-capable mode?
Thanks,
Elisabeth
This accurately describes the issue. There is nothing wrong with the mailto link, the mailto link fails to load. Often the webapp crashes.
The funny thing is that tel: link for telephone numbers work fine.
window.location.replace does in-fact work. Thanks!
Here is the jQuery to fix this automatically...
$('a[href^=mailto]').click(function (event) {
event.preventDefault();
window.location.replace = $(this).attr('href');
return false;
});
I think I've figured this out. I noticed when in app-capable mode, any http link will take you out of the app and launch a separate mobile safari window, take you to the page and show the Safari chrome. Makes sense (typically one wouldn't link to anything from an "all in one" app-capable web app. I noticed this because I implemented a 4 page app with my own "tab bar" at the bottom and was linking amongst the .html files with plain http links in the a element. When I replace this with a javascript function to load the pages using document.location.replace this doesn't happen.
So, on the form - I think what must be happening is that because I'm using a scheme (in this case, mailto:) somehow the browser is needed in "regular mode" to interpret the scheme and do the right thing by launching the email app and this clearly doesn't work when submitting a form. I haven't yet found anything in the Apple documentation specifically about this, so if anyone knows the technical details, please do post!
UPDATE: I did find that I can access a server side script using a form in web-app mode, so I'm still curious about the mailto: issue, if anyone has an answer.
Thanks,
Elisabeth
I am having the exact same issue with mailto links not working in the web capable mode. I just got done submitting a bug report to Apple. Let's see what happens, meanwhile I found another dev. platform for web apps that works in web capable mode and mailto links work, but it is funny how it works in this even--it is not as fluid as it is in Safari. Because even in this new web dev tool that I found, it closes your app and launches mail client, which is lame. In Safari it just slides in a mail window that slides back out if you hit cancel or send--it doesn't actually close your app.
Here is a workaround that does not depend on JQuery:
aTmp = document.createElement("a");
aTmp.href="mailto:example#example.com?subject=Test&body=Hello.";
aTmp.click();
Update: To run this code from a bookmarklet you have to wait about 1000 ms before the bookmarks bezel is closed and the browser is ready to respond. I realized this by wrapping the code in a setTimeout function.