Loading grid with user Inputs?
Hello,
I have looked through this forum and I was not able to find an answer nor the question. I am kind of new to Javascript.
1) Can I hide the grid on page load? I do not want to populate the grid until until some events have occured.
2) why is the script in the body of the html?
why isn't this script in the head section?
I tried putting this script in a function and have this function trigger when a user clicks a button but, it did not work.
I received garbage unformatted data? why?
<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);
// write grid html to the page
document.write(obj);
</script>
=========================
output:
Loading data, please wait...
company...
please help
I have looked through this forum and I was not able to find an answer nor the question. I am kind of new to Javascript.
1) Can I hide the grid on page load? I do not want to populate the grid until until some events have occured.
2) why is the script in the body of the html?
why isn't this script in the head section?
I tried putting this script in a function and have this function trigger when a user clicks a button but, it did not work.
I received garbage unformatted data? why?
<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);
// write grid html to the page
document.write(obj);
</script>
=========================
output:
Loading data, please wait...
company...
please help
Jason
August 31,