windows.location.href throws error on IE10 using vbscript

1.7k Views Asked by At

I'm trying to use Window.Location.Href in my VBScript code, this throws me an error on Windows 7, IE 10:

Object doesn't support this property or method

It's working on XP and it's even working on Win7 if I'm using javascript.

What can be the problem?

2

There are 2 best solutions below

2
On BEST ANSWER

Change to window.location.href (javascript sintax, no uppercase) and it will work.

2
On

It looks like Windows 7 IE 10 has some problems with VBScript. Can you try running your page in IE9 compatibility mode? If not then try to determine which object/property combination is giving you the problem. If Window.Location is the problem then try just using Location. However, if Location.Href is the problem then there may be a security issue going on.

More information on setting compatibility mode at vbscript is not working on IE10 browser mode