In a WebBrowser control, window.external is not available?

Your code seems right, but window.external.notify() method is takes String parameter, not Integer. Try window.external. Notify('123') call instead.

Hope this helps.

Up vote 2 down vote favorite 1 share g+ share fb share tw.

I'd like to call C# methods within a WebBrowser Control. Below is my code: In XAML, In C#, protected override void OnNavigatedTo(NavigationEventArgs e) { string html = string. Format("Push", "function call(){ window.external.

Notify(123) ;}"); WebBrowserForDetails. NavigateToString(html); } private void WebBrowserForDetails_ScriptNotify(Object sender, NotifyEventArgs e) { Debug. WriteLine(e.

Value); } Expected to see 123 in the debug window. When the Push is pushed, window.external. Notify is never called.

In fact, window. External is not available. I would like to call the window.external.

Notify function from the WebBrowser control to call the WebBrowserForDetails_ScriptNotify method. What should I do? Edit Reference links: MSDN: window.external.

Notify, Any way to set the WP7 Webbrowser control height Dynamically and lock scrolling? And Displaying HTML Content in Windows Phone 7 c# silverlight windows-phone-7 webbrowser-control link|improve this question edited Nov 28 '11 at 23:02 asked Nov 27 '11 at 9:27Calvin45912.

Not Windows-Mobile. For future reference we prefer that the content of a stackoverflow question actually contain a question. Your is a statement of fact.

– AnthonyWJones Nov 27 '11 at 14:22 @AnthonyWJones Yes, I am talking about WP7. Also I edited the question to be a question. Thanks for your comment :) – Calvin Nov 28 '11 at 21:24.

The problem is that window. External returns nothing but empty so I can't even get down to window.external. Notify – Calvin Dec 2 '11 at 2:54 There is test project that works for me: fileserve.com/file/BhVhMAZ/HTML.zip – Ku6opr Dec 2 '11 at 8:44.

I suspect that your issue is due to not providing a valid HTML5 document as your (body & html) elements aren't closed.

1 For the final point, but you need to read the code in the question more closely, neither of your first two points is true. – AnthonyWJones Nov 28 '11 at 21:55 It's not a HTML5 doc. I didn't declare the doctype: .

According to HTML4 spec (and HTML5 spec, too) you don't need closing body and html tags. Although I put closing tags, I still window. External gives an empty value :( – Calvin Nov 30 '11 at 21:39.

First off you probably want to read what Mike Taulty comments on offline browser content. mtaulty.com/CommunityServer/blogs/mike_t....

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions