:: Forum >>

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
Tuesday, January 12, 2010
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
Wednesday, January 13, 2010
10x JohnW ........It work very well :):):):)
Pascale
Tuesday, January 19, 2010

This topic is archived.


Back to support forum

Forum search