How do I get the back button from Windows phone to work with PhoneGap 1.2?
Now what the back button does is exit the app.
There is a good post I dont understand or get to work by one of the SO editors: http://www.scottlogic.co.uk/blog/colin/2011/11/handling-the-back-stack-in-windows-phone-7-phonegap-applications/
but I dont understand it and I cant get it to work. (even the sample .sln has an error for me)
My app is a very simple structure of index.html and many html does that come off that one page, so if all the back button did was goto index.html, that would probably work for me.
Is there a solution for idiots? For example - add this framework but only to specific pages. Put this code here, and that code there, and those pages dont need anything. Something like that?
I have recently published a more simple example for back-button handling in applications that contains simple HTML pages:
http://www.scottlogic.co.uk/blog/colin/2011/12/a-simple-multi-page-windows-phone-7-phonegap-example/
In essence, there is some C# code that keeps track of when the browser navigates from one page to another, handling the back-button event in an appropriate fashion. Just drop your code into the www directory and it should work fine.
Related
I'm testing something in a personal tab (something related to SSO, if that's important in context), and the tab renders fine for about 30 seconds or so, then suddenly gets replaced with an error "There was a problem reaching this app" (the one with the image of a woman and a thought bubble). Does anyone know why this suddenly happens AFTER the tab has ALREADY rendered ok?
I finally found an answer to this, so posting in case someone else has the issue. Basically, Teams manifest recently added a capability to show a loading / progress indicator to show users that your tab is still loading. It shows up in the manifest as "showLoadingIndicator" and is boolean (true/false). It can also be set in App Studio of course, as the image below shows.
The problem comes in that the "SDK" link shown in App Studio is flat-out useless - it links to the Teams js Library on GitHub, of all places! It should rather go to this section of this page, which explains how to deal with it. I was originally only calling microsoftTeams.appInitialization.notifyAppLoaded();, but I needed to also call microsoftTeams.appInitialization.notifySuccess().
Details: I'm using a Captcha control in my MVC 4 project but I'm getting the red cross where the image should be. The strange thing is if I put this on my main page (http://localhost/CaptchaDemo/) it works fine, but when I put it on the page I need it (http://localhost/CaptchaDemo/Account/Register/), it refuses to load. F12 shows the image src as CaptchaDemo/DefaultCaptcha/Generate?t={random stuff here}
Question: How can I make my Captcha image display on http://localhost/CaptchaDemo/Account/Register/ when it works fine on http://localhost/CaptchaDemo/ (where I don't even need it!)
Use SuperCaptcha control from codeplex.
http://supercaptcha.codeplex.com
It provides both refresh and listen features.
Easy to use and nice documentation provided. I used it in my project and it is working pretty well.
Having an issue with a wp theme and creator can't seem to help. It's Ajax driven and doesn’t support custom permalink...
So as soon as the website appeared on Google all link referred send to some black page which seem to be out of the website:
Link appearing in Google: www.thaiorchid.be/menus/ (black page)
Compared to the real webpage: www.thaiorchid.be/#menu-item-21
I start to have an idea of solution with: AJAX navigation in Wordpress - Trouble with Permalinks and tried it on the contact page www.thaiorchid.be/contact which doesn't redirect to the black page anymore but it's still not perfect compared to www.thaiorchid.be/#menu-item-19...
Any idea would be really welcome.
Thanks a lot,
Jonathan
Your site does not provide an appropriate fallback for non–JS browsers (e.g. most Google bots to my knowledge). This seems a (serious) shortcoming of the theme without knowing it any further.
If built properly, an “AJAX–enhanced” site like this should allow access to all content through basic HTML requests. If Javascript is available in a client, preferably the same content should be loaded using AJAX requests, allowing e.g. for faster page loads and nice transitions.
Another problem comes from a missing sub navigation. Since your sub menu (fly-out) is not available without Javascript, you would need to provide an alternative way to reach pages two levels deep and deeper.
Here's an example on how this page could/should work without Javascript:
1. Visit homepage
2. Click “Menus” in navigation
3. Opens “Menus” page, showing what the “black page” currently shows
+ proper header/footer
+ main navigation
+ sub navigation for all elements in “Menus” fly–out (“Potages, Entrées, …”)
4. Click “Potages”
5. View “Potages” page, again with proper
header/footer
+ main navigation
+ sub navigation for all elements in “Menus” fly–out
I know, you’re looking probably for a quick solution, maybe a snippet of code or a plugin to resolve your situation. Unfortunately — unless your theme provides you with some help — such a silver bullet doesn’t exist. The current implementation simply approaches the topic of an “AJAX site” in a fairly reckless way IMHO (you will be “happy” to know, that most screen readers won’t be able to access your content either) and until you re–build the theme or fix the structure you’re pretty much stuck with an unaccessible site.
i am not sure that this is the right place to ask this question, but i will anyway. i have only been working with html / javascript & jquery for about 2 months, but i have learned a little.
this is what i am trying to do. i have a free image gallery that i managed to included in a website i am trying to make. the gallery works fine, and i have set it up so that on top of each image is a button that fires a short .mp4.
it works fine, but when i click the gallery button to show the next page of pictures (about 15 per page), there are my old buttons. i think, just maybe if i could figure out what js or jq function id being called i may be able to swap in new buttons.
but i cannot understand what is happening. i looked for an onclick, but what they use is a bunch of "this" statements. i am pretty sure they are using an anchor tag to flip the page, but i can't figure out what is being called.
so i came across this site, and after about 10 attempts, finally got the thing to let me join.
i'm hoping i can post the code and maybe somebody could tell me what is happening.
i guess this wasn't much of a question, just an appeal for assistance.
Are you asking how you can debug your code? If you are using Chrome, you can use its Javascript debugger. Similarly, Firebug is a good developer plugin for Firefox.
Maybe I'm over-thinking this, but here's what I'm trying to accomplish.
I have two MVVM projects (assemblies) in my WP7 app. One page in the main project will call another page in the second project. The second page will allow the user to browse through a list of files on the web and select one to be downloaded to Isolated Storage. The files are rather small.
For a little background: I want two assemblies because this file-selection feature is not used often in the app and I want the Main assembly to be as small as possible to decrease startup time. I also want to be able to re-use this file-selection/download component in other apps.
The simple thing I'm trying to figure out is that when the user selects the file and it is downloaded, I will execute a GoBack() to return to the calling page. On the calling page, I need to know if, in fact, the user downloaded a file or if they cancelled out of the operation by simply hitting the back button. I thought the obvious thing might be to just check for the existence of the file in Isolated storage, but that just feel like a bit of a kludge to me.
I also thought about the Messenger, but I'm not sure how that would work across two assemblies.
Any advice would be appreciated.
Thanks
It is tough to know without looking at the code. However, I would suggest that you could pass back a value to the page depending on whether you successfully downloaded your file. Navigate with the value as follows (pass true or false depending on download success):
NavigationService.Navigate(new Uri(("/Page.xaml?download=true", UriKind.Relative));
Then evaluate the page in the destination as follows:
string download = "";
if (NavigationContext.QueryString.TryGetValue("download", out imageurl))
{
}