0
votes

there is this classic asp site that is using javascript to populate dropdowns or whatever they called it back then. Well, if I goto this site from the regular browser after a second it fills the dropdown with the data. But in the webbrowser control no such luck almost like Javascript is disabled.

For those interested in the sites source here it is below.

http://www.dailynewstube.com/html.txt

Is Javascript partially disabled in the Webbrowser Control? Any suggestions?

Thanks

2

2 Answers

1
votes

I think the JavaScript behaviour of webbrowser control is based on the setting of IE on your machine.

Also try setting following property of Web-Browser control to false:

ScriptErrorsSuppressed=false;

PS:- I saved your file and loaded it in my own form. It shows me 2 script errors:

  1. Line: 335 Error: 'parent.hidden' is null or not an object
  2. Line: 19 Error: 'top.menu' is null or not an object

Otherwise Property Category, Street Direction, Street Type combos (dropdowns) are filled.

0
votes

The WebBrowser control behaves differently to Internet Explorer - but is based on the same shell. One thing that sometimes happens is that a JavaScript error that gets forgiven in Internet Explorer isn't handled in the shell, so there is a silent error that's preventing your code from executing.

You might want to run your JavaScript through JSLint to check for errors or switch script errors on in your C#:

ScriptErrorsSuppressed = false;

As per this article: MSDN ScriptErrorsSupressed