inactive form after visted once in windows phone javascript - javascript

i've developed and app in windows platform for windows phone 8.1(javascript), now am face a bug which is creating a big issue, the template i used in developing the app was navigation app, so i used page control to navigate easily, the bug i have is once i enter a page which contains form, and doing all stuffs.... its ok, but the thing is when i navigate back to previous page and enter again the FORM GOES INACTIVE, anything request is not responding, but when i close that app and reopen it, it works, please help me on this issue. awaiting for helpfull answers. thanks in advance

Check if you are using CacheMode.Required or something that keeps your page loaded - in this case method OnNavigatedTo will be called only once.

I was using all the JavaScript in the same html, but in Windows it all has to be given in ready function(page control) even if it is a jQuery code.

Related

button control on form to manipulate Web Browser control web page

I was hoping that someone could answer me a question, I don't need any code but more a helpful direction to start researching.
Here is my situation
I have a windows Form program that if I placed a button control on and a web browser control on. The web browser will have a page in it that is mostly javascript driven..now lets say thru javascipt on the web page I created a checkbox control on the webpage. Is there any way I could get my button control on my windows form to check that box? Im sorry if I am not explaining myself right still getting used to the lingo.
Thanks in advance guys
This site is a wealth of knowledge.
I assume you have WebBrowser control. Handle it's DocumentCompleted event and start you work here. Now you can work with WebBrowser.Document, WebBrowser.Document.Body to interact with your page.
For example, you can use wb.Document.InvokeScript with some parameters to handle the updates.
Or you can go directly
wb.Document.GetElementById("your_Element_ID").SetAttribute("checked", "checked")

Can we navigate to ios WebView page from javascript page?

Can we open an ios WebView page from HTML5 using javascript?
I have to redirect to the native ios page from the javascript code on a button click. Is this possible?
I have gone through some links as mentioned below,
How to open a native iOS app from a web app
http://blog.grio.com/2012/07/uiwebview-javascript-to-objective-c-communication.html
But, am not pretty clear with the solutions.
Please help me with your answers and with some proper links.
As you are able to receive/send messages from and to JS. I hope you have UIWebView is added as subview in one of your viewController's view(self.view). Pass the Java script message to your ViewContoller do action here. take for an example you want to present you do it from here.

How to animate book page turn effect in WebBrowser control in windows phone 8

I am working on windows phone 8 book reader application, i am showing my all html pages on a web browser control, so now when i page change by click next button it suddenly change the page and navigate to another page. I want page should flip like a real book page. If anything required for the answer please let me know, but help me in this.
If you are using a browser control the behavior is gonna be exactly as the website and you can't change it. but you can get a flip affect by using native windows8 xaml. Take a look at this:
http://msdn.microsoft.com/en-us/magazine/cc507644.aspx

Facebook 'Like' Dialog Appears and Immediately Disappears

I've been having an issue with the Facebook Like button for quite some time. I've looked all over for a solution but am quite stuck. The error occurs on my site www.MapYourVote.com. When you go to a poll page and click 'Like' the dialog appears and quickly disappears. At the same time, the counter also goes to 1 and quickly goes back to 0.
The problem is always solved for individual poll pages by using the Facebook Debug tool (http://developers.facebook.com/tools/debug). Once you use it on the url, the like button will work as expected. The issue is my website is dynamic and I can't use the Facebook Debug tool every time someone creates a new poll. The Facebook Debug tool does not reveal any problems (apart from og image size but I doubt that's the issue).
Here is an example of a page in which the Like button does not work. If you were to enter this url into the Facebook Debug tool, the Like button would work.
http://www.mapyourvote.com/Poll/Election-Result-Feelings/
Any help would be much appreciated!
I also had this problem. I was constructing a referrer url to give link-sharers a credit, so there was a different url for each user that wanted to share something. The referrer link would give the user credit and redirect to the login page of my site. With this configuration, the like dialog would appear for a moment and then disappear again, unless I went to facebook's debug tool.
What fixed the problem for me was to change from a redirect to rendering the page directly from my referral link. In fact, I changed the referral link to be a ?r=refid parameter on my root page URL. It appears to work correctly if facebook doesn't have to follow a redirect to get the og: data.
I had a similar problem and it turned out I had too restrictive cookie policy set in my browser - I only allowed Facebook to use 1st party cookies. When I allowed Facebook to use other cookies, the problem was solved. It's hard to debug when no error appears other than the immediate pop-up closeup.
I had the same problem. It was caused by url value in data-href attribute. I had there url pointing to my localhost.
When I changed the url to existing one, problem was solved.
Hope it helps
For me, the problem (Like popup disappearing after a second) was happening when the Like button URL redirected to another URL.
The fix was to add og:type, og:url, and og:title (required per https://developers.facebook.com/docs/reference/opengraph/object-type/website), then running the URL through the Facebook debugger to clear the cache (https://developers.facebook.com/tools/debug).
More at https://stackoverflow.com/a/16597060/2391566

Providing a back link inside of a Facebook tab

I'm trying to use history.back() inside of my Facebook app to go up our site hierarchy since the browser back button is obviously useless in this sort of situation. I'm using javascript to avoid having to manage history site on the backend but it's proving to be very buggy. Clicking a link with href="javascript:history.back()"causes the page to scroll around a couple times then actually causes top to go back...
Any help with this subject is greatly appreciated.
So it turns out that history.back() is not possible due to the way Facebook hacks around with the iframes that run apps. I ended up having to implement a pseudo-back link via an implementation in the server-side framework I was using.

Categories