views:

796

answers:

2

Hi, 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

+1  A: 

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.

TheVillageIdiot
Thanks for the reply. I set the ScriptErrorsSuppressed to false I receieved those 2 errors that you mentions. After clicking ok on both of them those fields that you mentioned still failed to populate. This works in IE for me so its pretty frustrating.
Proximo
A: 

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

Sohnee
Yes there is a script error but it isn't my site so I can't just fix the error. What to do now?
Proximo