Unanswered WebBrowser-Control WinCE 5 does not execute javascript on WEC7

  • Monday, October 29, 2012 9:16 AM
     
     

    Hello

    in case to implement advanced functions for my embedded device, i have to include the webbrowser-control into my C#-application, that
    will open an local html-page including a simple javascript.

    Debugging this application with VS2005 and the Pocket PC 2003 SE-VGA-Emulator works perfect without any problem.
    Starting this application on WEC7 will open the HTML-page but does not execute the javascript-code.

    Opening the same HTML-page direct with the system integrated iesample.exe will show the page correct (including the execution of the javascript).

    Can someone give me a tip, how can I solve this problem?

    Thx in advance,
    Peter


    Gruss pak

All Replies

  • Monday, October 29, 2012 3:52 PM
     
     

    Peter,

    I'm sorry that my answer is a big foggy. If it were me, I'd look at the source for IESAMPLE and identify anything that is being done to configure the WebBrowser control that I am not doing in my application. It occurs to me that Internet settings might be available to disable script processing.

    It was not clear from your message that opening your page in WEC7 in the browser correctly processes the script. Does it?

    Paul T.

  • Tuesday, October 30, 2012 7:34 AM
     
     

    Paul,

    thank you for answering. I will describe the problem a bit more precisely now.
    The embedded system is running with windows embedded compact 7. Currently we use VS2005 to write software for it, because VS2010Pro does not support CE-development. In our application (based on .NET-Framework 2.0) among others, we have to integrate a browser to view several local stored html-pages, that including simple javascripts for several visual animations (mouse_over, mouse_pressed, etc.). For this we are using the webbrowser-control from "System.windows.forms.webbrowser".

    If i start this application in our VS2005-IDE with the "Pocket PC 2003 SE-VGA-Emulator"- Device, the local stored html-pages and their Javascripts will be processed correctly.

    If i start the same html-page on the embedded system with the WEC7 integrated browser (IESAMPLE)by doubleclick, the html-page and the Javascript will be processed correctly.

    If i start this application on the embedded-system, only the html-code without the javascript will be processed.

    I also had tested to change the internet-security options of the embedded system to enable everything, but this does not help.

    Maybe you can help me to understand the problem a bit more to find at last an solution for this. So correct me please if i'm wrong.
    If i include a the browser-control from "System.windows.forms.webbrowser" into an application, the application will use the browser of the system this application is currently running and is using the internet-security options activated on this system.
    Therefor i cannot understand why the html-page called by doubleclick will start the IESAMPLE-browser and is processing the javascript correctly and integrating the "same" browser into a application will avoiding the processing of the javascript.

    Is "hacking" the code of IESAMPLE only the last chance?
    And if this is true, can you addvice me a site where i can find further information about it?

    Peter K.


    Gruss pak


    • Edited by Peter Kowal Tuesday, October 30, 2012 7:40 AM
    •  
  • Tuesday, October 30, 2012 3:32 PM
     
     

    The items available in the operating system *on a specific device* are under the OEM control. I don't recall whether JavaScript is modularized in WEC7, but it used to be. That is, you could include OR NOT JavaScript support in your OS build. If no JavaScript in the OS, obviously it wouldn't work. This could be a difference between your target device and the Pocket PC, which did include JavaScript.

    IESAMPLE is the user of the "Internet Options". Those are not options that the browser control reads and uses; it's up to the application using the browser control to decide what the settings are and tell the control. That was my point concerning reading the IESAMPLE code; see if it's setting some JavaScript enable option for the Web Browser control and, if so, you do the same.

    Yes, the .NET Compact Framework WebBrowser control uses the actual native code control in the OS. It's just a wrapper as with TextBox, ListBox, etc.

    It sounds like you're saying that yes, IESAMPLE ***ON YOUR TARGET DEVICE*** works, but your application does not. If so, you don't have to modify IESAMPLE, you just have to figure out what it is doing that your application is not doing.

    Paul T.

  • Wednesday, October 31, 2012 9:52 AM
     
     
    Paul,

    thank you for supporting me. That was very usefull for me  to set my focus onto the right part of the possible sources of error. Once together I have to investigate the target device now and possibly I also have to contact the manufacturer of this system for a targeted search. In case of our upcoming bank holiday weekend, it will take some time. Last not least, I will post in this thread the results what i figured out , so it maybe helps otherones with the same prob. But don't expect the results for this week, please.

    Peter K.

    Gruss pak