1

I've been using window.external in my c# windows application successfully to call a public function in my C# form. I've correctly set the objectforscripting property, and this works wonderfully on my development machine which has Windows 7 and IE9.

On my test machine however, which is a windows XP computer, window.external is not working. I am getting 'object' when I check the typeof of the window.external object, but when I try to enumerate it for functions, there's nothing.

When I try to call the function nothing happens. There must be a javascript error, but don't know what it is since the browser doesn't tell me.

I am sure windows.external is pretty popular and people must have used it on all OSs including WinXp and IE6. Any idea why this is happening to me?

Cyril Gupta
  • 13,505
  • 11
  • 64
  • 87

1 Answers1

1

Okay, I am a bit embarrassed, but I thought I should tell everybody how I solved it instead of deleting the question so that if anyone else's been stupid enough, they'll know.

The function I am referring to had a call to mshtml dll, which was not a part of my setup build sent to win xp. window.external doesn't execute a function at all if there's an exception in it like this one.

I could solve it by including mshtml in the setup.

Cyril Gupta
  • 13,505
  • 11
  • 64
  • 87