Please login or register.

Login with username, password and session length

Author Topic: IE8 security and SDK.  (Read 4817 times)

clarknayl

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 1
IE8 security and SDK.
« on: March 27, 2011, 07:58:53 PM »

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="styles/mainStyle.css" type="text/css">
   <title>Lamp Lighter</title>   
</head>
<BODY onload="loader()">
<CENTER><H2>PTC Lamp Lighter Commands</H2></CENTER>
<SCRIPT type="text/javascript" LANGUAGE="JavaScript">
var x10;
function loader(){x10 = new ActiveXObject( "X10.ActiveHome" );}
function DoCommand( Command ) {
      if (Command == 09) {x10.SendAction( "sendplc", "a5 on"  );}
      if (Command == 10) {x10.SendAction( "sendplc", "a5 off" );}

</SCRIPT>
<CENTER><FORM NAME="myButtons">
  <BR>
   <INPUT NAME="btnSendCommand09" TYPE="Button" VALUE="A5 ON"  onclick="DoCommand( 09 );">
   <INPUT NAME="btnSendCommand10" TYPE="Button" VALUE="A5 OFF" onclick="DoCommand( 10 );"><br>
</FORM></CENTER>
</BODY>
</HTML>

Works from a server when "Enable Protected Mode" is left unckecked, but not when checked. Works both ways in localhost. Any ideas?

Many Thanks,
ClarkNaylor
Logged

ErikP

  • Guest
Re: IE8 security and SDK.
« Reply #1 on: April 01, 2011, 08:14:07 PM »

All SDK commands get routed through the X10nets service.  Unfortunately, this service must run elevated (run as administrator) to work properly.  Applications working in protected mode do not have permission to access or bind to a process running elevated.

Localhost works because windows treats local content specially and automatically does not run in protected mode.

See the "Understanding and Working in Protected Mode Internet Explorer" article on MSDN for more information.
http://msdn.microsoft.com/en-us/library/bb250462(v=vs.85).aspx

If you are working on a system with the ActivePhone plugin installed you could alternatively use some Anthony Lavado's excellent tips and tricks to build some URL calls into your webpage to send the PLC commands that way.  This will work in protected mode.
http://forums.x10.com/index.php?topic=21436.0
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.