AnsweredAssumed Answered

URL Form request  serial function

Question asked by Alexander Caldwell on Apr 19, 2011
Latest reply on Apr 21, 2011 by Alexander Caldwell

Trying to send string "!S 00 01" to serial through http_request.open sends %20 instead of <space>

 

Webpage extract"width:100"type="button"value="ON/OFF"id="00"onClick="sendIR(id)"/> 

<tr><input style=

 

 

New Function in main.js

/////////////////////////////
//    
// send ir command 
// 
/////////////////////////////

function sendIR(id){
var http_request = open_ActiveXobject();
if(!http_request) return 0;

my_command = "serial="+"!S "+id+" 01";
//alert(my_command)

http_request.onreadystatechange = function() {;};
http_request.open('GET', 'tvcontrol.htm?'+my_command, true );
http_request.send(null);
}

 

Output

!S%2000%2001

 

Any ideas how to get round this?

Outcomes