wp7 webbrowser navigating event not triggered - windows-phone-7

I have a webpage with a hyperlink "myapp://mypage?id=123456&name=hello" , clicking the link is supposed to trigger the webbrowser Navigating event so that I can catch the url and do something meaningful. The problem here is that the Navigating event is not triggered at all.
I tried normal website eg: "http://xxxx.com" and it works. So is there a way to deal with user custom urls with webbrowser control?
ps: IsScriptEnabled is True
thanks

From my investigation into this, WebBrowser.Navigating only gets called if you attempt a hyperlink when using the file, http and mailto protocols. Custom protocols are not even served.
Digging around the web for custom extensions leads me to believe that it is possible to implement something that works around it, but doing so would be a great deal of headache and pain.
If you do/did find anything, please post it, as I would be interested to see your solution.

Related

Windows Phone: how to handle an event from a web page in a WebView?

Which callback/delegate is the one to intercept the event of a user clicking on a link within a WebView?
I'd want that URL. I just need to know if it is possible and how should I do in some way.
You can catch events triggered by Javascript code with ScriptNotify event described here.
Not sure what you really want to do but this might be a starting point for you.

CefSharp - How to handle "This page has insecure content." message?

I am using the CefSharp .Net wrapper for the Chromium Embedded Framework as a simple wrapper around a web application. In my web application, I make a JSONP AJAX call out to another domain to get some data and display it. The URL to that domain is not using SSL. Because of that, when doing this in the Chrome browser, I get the following message, to which the end user would simply click "Load Anyway", allowing the JSONP request to fire and the data to be retrieved...
The app using CefSharp simply starts up the main URL to my web application when it runs. When I try and make the same call in my this application using CefSharp, however, it doesn't get that same prompt. Instead, the AJAX request just times out (the same behavior that happens when the end user never clicks a button in the yellow bar that appears in Chrome).
Does anyone know if CefSharp has a way for me to catch this security message and either...
Prompt the end user to click "Load anyway", similar to the behavior of the Chrome browser, or
Programmatically bypass the security warning altogether?
If not, does the Chromium Framework itself support dealing with this situation?
After posting to CefSharp and CEF projects, it looks like CEF does not currently support this situation. magreenblatt suggested a couple of approaches to add it to CEF. Now I just need to try and find the time to add support for it. :-)

Back button to ajax results, advice request

I am trying solve the back button issue within my app. The scenario is:
I have a home page with a search form which sends and receives data with $.ajax(), then the results loaded through ajax, their links points to a controller that won't be done by GET in ajax so that means that the page will be refreshed (so the home page with the results looks like this: http://url/en/home and a result link may look like this http://url/fetch/data/x123av).
The problem is which is the best way fix that when click back button to return the results from the search box?
I have found some answers in stackoverflow related to my question:
http://code.google.com/p/reallysimplehistory
http://tkyk.github.com/jquery-history-plugin
But from the documentation of those plugins, they all work by checking the hash change which I don't have.
Hope I have explained well enough, and I do have searched stackoverflow and google for a solution but I didn't find one that is close to this or either I've jumped over it...
Please just point me to the right way :D
But from the documentation of those plugins, they all work by checking
the hash change which I don't have.
If you want to handle the back button with AJAX request you will have to redesign your application so that it works with hashes as that's the only way. Changing the fragment portion of an url doesn't trigger a page reload but it is added to the history, so when you press the back button you are able to detect this change without navigating away from the page.
As mentioned by SLaks in the comments section another possibility is to use the HTML5 history API but obviously this assumes that the client browser supports it.

Suggestion for FullCalendar event removal UI

I have my fullCalendar functioning well, however, I need to allow the users to remove events from the calendar. I can use the clickEvent method to bring up a confirmation window with a "do you want to remove" message. But this seems kind of clunky. Is there a better UI way of removing events?
Google calendar uses a qTip on click that offers "edit event details" and "delete". At first I didn't like sending users to a different "event details page" but after thinking about this for awhile it is a really good way to go.
It is always safer to ask for a confirm before removing something.
Anyway you can customize the rendering of the event using the eventRender callback
In particular you can:
attach custom markup to render an X image that when clicked will ajax call a delete function
you can attach other jQuery plugins to reproduce exactly the qTip effect
Have a look at the link for more details. Hope it helps

Browser inside of a browser

I am not trying to track clicks or anything like other people - I just want to put a browser within a browser that can go back, forward, refresh, accept user-entered URLs, and store bookmarks. Can flash/silverlight/ajax/whatever do this? If so, how?
How about:
Solution 1:
Create or use an existing ActiveX Web Browser control.
And let your web/page host that ActiveX, or host multiple controls.
Solution 2:
Put an iframe inside a UserControl, a textbox and a go button.
Get the user provided url from textbox.
Change the src of the iframe when user clicks the go button.
_
<iframe id="iFrame" name="myFrame" src="http://bing.com"
width="100%" height="300" frameborder="0">
<p>Does your browser support iframes?</p>
</iframe>
--EDIT--
This is in response to your comment; you posed 3 questions:
For 1, thats correct, ActiveX works for IE, more specifically for Windows; there are ways you can install ActiveX for different browsers, but it(the ActiveX) would require windows OS. See this.
For 2, try handling that using JavaScript; something like following within iframe block.
<p>Back</p>
Checkout these examples.
For the third one, if I understand you correctly then you can always parse the url when user clicks onto the Go button; and respond accordingly before rendering the page.
flash can do basic html (AFAIK) not sure about silverlight.
you will struggle to do it with javascript/iframes. Especially back/forward/refresh buttons. If you are on the same domain you have some control over the iframe, but once it leaves your domain, you lose control
Would using an iframe or an object with type="text/html" be useful to you in terms of being able to embed a page within a page? Either method effectively permits loading a separate page within a page with little side-effect.

Resources