2

Since upgrading to Internet Explorer 8 I've been getting JavaScript errors when performing certain functions (like "Turn On") on the Virtual Server 2005 Enterprise R2 SP1 Administration Website:

Message: 'document.getElementById(...)' is null or not an object
Line: 4
Char: 1
Code: 0
URI: http://myserver.mydomain.local:1024/VirtualServer/VSWebApp.exe?view=1

Are there any workarounds to this problem other than using another browser?

Tom Robinson
  • 775
  • 2
  • 11
  • 21

2 Answers2

7

I have found the solution to this problem in another question's answer but thought it was worth keeping my question up as, for the exact problem above, this question is easier to find.

The Microsoft Virtual Server 2005 R2 web admin page needs to be displayed in "Compatibility View" mode in IE8

Source: Accessing Virtual Server 2005 RC2 hosted machines using IE8

Tom Robinson
  • 775
  • 2
  • 11
  • 21
1

Or you can type some Javascript into the address bar and get it working. Amazed that their HTML is so shoddy, they didn't give the 'vm' or 'action' elements an ID, only a name, so replacing getElementById() with getElementsByName()[0] fixes it; the following worked for me in Chrome:

Type the following into the address bar to turn on the VM:

javascript:document.getElementsByName('action')[0].value='poweron';javascript:document.getElementsByName('vm')[0].value='YOURVMNAMEHERE';document.getElementById('form1').submit();

likewise, to turn the VM off, type:

javascript:document.getElementsByName('action')[0].value='turnOff';javascript:document.getElementsByName('vm')[0].value='YOURVMNAMEHERE';document.getElementById('form1').submit();
willbradley
  • 328
  • 2
  • 6