3.2.0

Js variable into php variable

obj.onSelectedRowsChanged = function(rowIndicesArray){
var MacId =obj.getCellValue(0,rowIndicesArray);
label.setControlText(obj.getCellValue(0,rowIndicesArray));

}

</script>

<input name="MachineId" value=????????????? >

How can i put the text of the label in the input
10x for helping me :)
Pascale
January 12,
First, make your input box, leaving the value blank. Give it an ID (unique string that refers to "JUST THAT ITEM"). (If you don't want to give it an id, you can use document.getElementsByName("MachineId"), but that might return more than one item if you ever reuse MachineId as a name.)
<input name="MachineId" id="MachineId" />


Then, get your textbox via javascript, retrieve the control text from the label, and assign it to to value of the textbox.
var x = document.getElementById("MachineId");
var l = label.getControlText();
x.value = l;


Which can be shortened to this line...
document.getElementById("MachineId").value = label.getControlText();


JohnW
January 13,
10x JohnW ........It work very well :):):):)
Pascale
January 19,

This topic is archived.

See also:


Back to support forum