I have a problem with Windows Mobile 6.5 Professional. An application to open a website from the web browser has been developed which runs on Windows Mobile 6.5 Classic. Professional website works correctly in IE, but javascript / jquery is not working in my application with web browser. I have the content of professional request agent (request. User Agent) strange: Mozilla / 4.0 (compatible, MSIE 6.0, Windows CE; IE 7-7)
When the classic following result appears:
Mozilla / 4.0 (compatible, MSI 6.0, Windows NT 5.1, Windows Phone 6.5. 3.5
I have recently stumbled on the same problem. Javascript works in IE, but not in my C # WebBrover component.
Solution HKLM \ Security \ Internet Explorer \ The MSHTML registry key was to be checked. To allow javascript inside the web browser, stay 0! Now checks my code and it changes the regga key to zero (if not already 0) and then call initialize group (.). / P>
key webbrows in each other Change the behavior of God the way: the arrow keys do not focus on the links, but they scroll Vebbrovr scene.
Hope you will also get help.
Edit: Here is a code sample:
using the system; Using System.Linq; Ystem.Collections.Generic; Using System.ComponentModel; Using System.Data; Using System.Drawing; Using System.Text; Using System.Windows.Forms; Namespace Web Browser {Public Partial Class} Form 1: Form {Public Form 1 () {checkMSHTML (0); InitializeComponent (); WebBrowser1.ScriptErrorsSuppressed = false; } Private Zero Toolbar 1 button (click), object sender, toolbar button. Switch (E. Button Image Indexes) {Case: Web browser 1. Url = new urie ("http://192.168.128.5/www"); break; Case 1: This Close (); break; }} /// & lt; Summary & gt; /// Check and Replace MSHTML Rendering Engine /// & lt; / Summary & gt; /// & lt; Param name = "iVal" & gt; 0 = Use new IE6 engine, enable javascript /// 1 = Use old PIE engine & lt; / Param & gt; /// & lt; Returns & gt; & Lt; / Returns & gt; Bool checkMSHTML (Int iVal) {bool bRet = false; Microsoft.Win32.RegistryKey rKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey (@ "Security \ Internet Explorer", True); If (RKE! = Null) {INS IMSHTML = (int) rKey.GetValue ("MSHTML"); If (iMSHTML! = IVal) {rKey.SetValue ("MSHTML", iVal, Microsoft.Win32.RegistryValueKind.DWord); RKey.Flush (); RKey.Close (); BRet = true; } Else {rKey.Close (); BRet = true; }} Return bRet; }}}
No comments:
Post a Comment