locked
Webview Accepting Message form Webpage RRS feed

  • Question

  • Hi

    Im building a windows app that uses WebView tool to access a website,

    Within the web site they are Message From Webpage.

     Is they a way the WebView tool can handle these requests with out getting a Debug error

    “Confirm is Undefined”.

    Or does the website have to have its Java Script code edited for to work?

    The programing language I am using is C# I have tried palying around with ScriptNotify with no results,

    Help on this matter would be much apreciated

    Regards Ant

    Friday, January 24, 2014 2:52 PM

Answers

  • Methods such as confirm and alert which create a new window are not supported in the WebView. If this is a specific web site that you can add to your ApplicationContentUriRules then you can modify it to call window.external.notify and then raise a Xaml confirmation dialog from C# in response to the ScriptNotify event.
    Saturday, January 25, 2014 3:56 PM
    Moderator

All replies

  • Methods such as confirm and alert which create a new window are not supported in the WebView. If this is a specific web site that you can add to your ApplicationContentUriRules then you can modify it to call window.external.notify and then raise a Xaml confirmation dialog from C# in response to the ScriptNotify event.
    Saturday, January 25, 2014 3:56 PM
    Moderator
  • Hi Rob

    Thank you for your reply, would you be able to help me with the code, as am new to windows appsAm I correct in thinking, if I follow the process above then they is no need to edit any code on the webpage,

    I have added the web address to the Application Content UriRules in the Package.appxmanifest.

    I am now lost to as what is needed to be done now.

    Hope you can help would really appreciate it.

    Regards

    Anthony

    Friday, February 7, 2014 9:06 AM