3.2.0

Please help me with this :'( Grid with data from Javascript

Hi, i'm using PHP to generate a javascript array with values to load in a grid. My question is how can i refresh the grid to get new values from the array?? Kind of like the table.request() used when is a XML file. Please help me with this :'( i'm going nuts!!
Oscar
April 9,
here's somenthing i made. I'm using the Temporizador function to make the grid refresh every amount of time. Please help meeeeee!!

<script>
    function Temporizador() 
    {
        obj.setCellData(myCells);
        obj.reload();
        setTimeout("Temporizador()", 1000);
    }			
</script>
</head>

<body>
<script> 
 var myCells = 
 [
   ["MSFT","Microsoft Corporation", "314", "<?php echo rand(0,20); ?>"],
   ["ORCL", "Oracle Corporation", "62", "<?php echo rand(0,20); ?>"],
   ["SAP", "SAP AG (ADR)", "40", "<?php echo rand(0,20); ?>"],
   ["CA", "Computer Associates", "15", "<?php echo rand(0,20); ?>"],
   ["ERTS", "Electronic Arts Inc.", "14", "<?php echo rand(0,20); ?>"]
 ];
  var obj = new AW.UI.Grid;
  obj.setCellText(myCells);
  obj.setColumnCount(4);
  obj.setRowCount(5);
  document.write(obj);
  setTimeout('Temporizador()', 1000);
</script>
</body>
Oscar
April 9,

This topic is archived.

See also:


Back to support forum