How do I refer to a control outside of that control?
Heres a really simple example. I have a grid and I want to populate a cell in that grid by referring to it outside the script block. Im trying to make this simple. I know I can do it within the script block but I have a need to refer to the grid outside of the grid control itself and outside of the script:
<script type="text/javascript">
var grid2 = new AW.Grid.Extended;
grid2.setId("grid2");
grid2.setHeaderText(["UPC", "Description", "Quantity", "Price", "Total", "Taxable"]);
grid2.setFooterText(["Subtotal","","Sales Tax:","","Total",""]);
grid2.setFooterVisible(true);
grid2.setColumnCount(6);
grid2.setRowCount(10);
grid2.setCellEditable(true,0);
grid2.setCellEditable(true,2);
grid2.setCellEditable(true,3);
grid2.setCellEditable(true,5);
grid2.refresh();
</script>
<br>
<input type='button' onclick=" document.getElementById(grid2.setCellText(\pressed button\,1,10));" value='Test' name='btnTest'/>
Thanks,
Chris
<script type="text/javascript">
var grid2 = new AW.Grid.Extended;
grid2.setId("grid2");
grid2.setHeaderText(["UPC", "Description", "Quantity", "Price", "Total", "Taxable"]);
grid2.setFooterText(["Subtotal","","Sales Tax:","","Total",""]);
grid2.setFooterVisible(true);
grid2.setColumnCount(6);
grid2.setRowCount(10);
grid2.setCellEditable(true,0);
grid2.setCellEditable(true,2);
grid2.setCellEditable(true,3);
grid2.setCellEditable(true,5);
grid2.refresh();
</script>
<br>
<input type='button' onclick=" document.getElementById(grid2.setCellText(\pressed button\,1,10));" value='Test' name='btnTest'/>
Thanks,
Chris
Chris
April 14,