2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00
fhem-mirror/fhem/www/pgm2/fhemweb_textField.js
rudolfkoenig a1beda9398 FHEMWEB: textField by justme1968
git-svn-id: https://svn.fhem.de/fhem/trunk@3922 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2013-09-18 11:45:00 +00:00

32 lines
461 B
JavaScript

function
FW_textFieldUpdateLine(d)
{
var name = "textField."+d[0];
//console.log("Cmd "+d);
el = document.getElementById(name);
if(el) {
el.value = d[1];
}
}
function
textField_setText(el,cmd)
{
var v = el.value;
//console.log("Got "+v);
//console.log("Cmd "+cmd);
var req = new XMLHttpRequest();
req.open("GET", cmd.replace('%',v), true);
req.send(null);
}
FW_widgets['textField'] = {
updateLine:FW_textFieldUpdateLine
};