Hi,
I am trying to put this html/javascript code into c# webbroswer control but it shot on script error.
This is the javascript code:
var gainerTick = new WBIHorizontalTicker('gainers');
gainerTick.start();
var loserTick = new WBIHorizontalTicker('losers');
loserTick.start();
and this is what I wrote in my c# form init function:
webBrowser2.AllowNavigation = true;
webBrowser2.AllowWebBrowserDrop = false;
webBrowser2.IsWebBrowserContextMenuEnabled = false;
webBrowser2.WebBrowserShortcutsEnabled = false;
webBrowser2.ObjectForScripting = this;
webBrowser2.DocumentText =
" " +
" " +
"" +
"";
if someone can help, it would be great
thanks

ramya bharathRank #3,780 · 391 reputationPosted May 29, 2015, 12:08 PM EDT
ramya bharathRank #3,780 · 391 reputationPosted May 29, 2015, 11:25 AM EDT
webBrowser2.DocumentText =
" " +
" " +
"" +
""
webBrowser2.DocumentText =
" " +
" " +
"" +
";
Hope it works now
Refer this
https://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.objectforscripting(v=vs.110).aspx
shlomi gadol35 reputationPosted May 29, 2015, 11:46 AM EDT
shlomi gadol35 reputationPosted May 29, 2015, 9:36 PM EDT
shlomi gadol35 reputationPosted May 29, 2015, 10:12 PM EDT
ramya bharathRank #3,780 · 391 reputationPosted May 31, 2015, 3:00 PM EDT
shlomi gadol35 reputationPosted May 31, 2015, 7:58 PM EDT
ramya bharathRank #3,780 · 391 reputationPosted May 31, 2015, 8:14 PM EDT
shlomi gadol35 reputationPosted May 31, 2015, 8:17 PM EDT
ramya bharathRank #3,780 · 391 reputationPosted May 31, 2015, 8:57 PM EDT
shlomi gadol35 reputationPosted Jun 1, 2015, 5:30 AM EDT
ramya bharathRank #3,780 · 391 reputationPosted Jun 1, 2015, 11:21 AM EDT
shlomi gadol35 reputationPosted Jun 2, 2015, 12:51 AM EDT
ramya bharathRank #3,780 · 391 reputationPosted Jun 2, 2015, 8:45 PM EDT
shlomi gadol35 reputationPosted Jun 2, 2015, 9:14 PM EDT
ramya bharathRank #3,780 · 391 reputationPosted Jun 3, 2015, 12:01 PM EDT
The SendKeys class has been updated for the .NET Framework 3.0 to enable its use in applications that run on Windows Vista. The enhanced security of Windows Vista (known as User Account Control or UAC) prevents the previous implementation from working as expected.
The SendKeys class is susceptible to timing issues, which some developers have had to work around. The updated implementation is still susceptible to timing issues, but is slightly faster and may require changes to the workarounds. The SendKeys class tries to use the previous implementation first, and if that fails, uses the new implementation. As a result, the SendKeys class may behave differently on different operating systems. Additionally, when the SendKeys class uses the new implementation, the SendWait method will not wait for messages to be processed when they are sent to another process.
If your application relies on consistent behavior regardless of the operating system, you can force the SendKeys class to use the new implementation by adding the following application setting to your app.config file.
To force the SendKeys class to use the previous implementation, use the value "JournalHook" instead.
Refer the link below
ramya bharathRank #3,780 · 391 reputationPosted Jun 3, 2015, 12:02 PM EDT