3.2.0

access function

Hi,

I'm loading a active widgets from xml.
The grid load well...but i want to access a function or same data from the grid and the button that do this, it was loaded before the xml:


see this:

This is loaded before the xml:
<input type=button onclick=""callfunctionfromgrid()" value=""click>

So, i cal the xml that content the grid:

<script>

// create ActiveWidgets data model - XML-based table
var table = new Active.XML.Table;

// provide data URL
table.setURL("../data/companies-simple.xml");

// start asyncronous data retrieval
table.request();

// define column labels
var columns = ["Ticker", "Company Name", "Market Cap.", "$ Sales", "Employees"];

// create ActiveWidgets Grid javascript object
var obj = new Active.Controls.Grid;

// provide column labels
obj.setColumnProperty("texts", columns);

// provide external model as a grid data source
obj.setDataModel(table);

function callfunctionfromgrid() { alert('thats ok'); }

// write grid html to the page
document.write(obj);

</script>

but this don't work, the error is "Object expected",

thanks!
Alex Campos
December 18,
the button is:
<input type=button onclick=""callfunctionfromgrid()" value="click me">
Alex Campos
December 18,

This topic is archived.

See also:


Back to support forum