How to print the elements of a table...
I read some posts here and figured out that I can print the elements of a table without putting it in a grid...but now I am not able to position the data. I get a screen refresh and it prints the data on the next page.
Here is the script...it does not matter where I put it, the data comes up on a fresh page:
function LoadData()
{
var table = new Active.XML.Table;
// provide data URL
table.setURL("data/CallSummaryReport.xml");
// start asyncronous data retrieval
table.request();
var defaultResponse = table.response;
table.response = function(data){
defaultResponse.call(this, data);
document.write('<table width="60%">');
for (i = 0; i <table.getCount(); i++){
document.write('<tr>');
document.write('<td width="50%" bgcolor="#FFFF99" height="21">'+table.getText(i,0)+'</td>');
document.write('<td width="50%" bgcolor="#FFFF99" height="21">',i,'</td>');
document.write('</tr>');
}
document.write('</table>');
}
}
Here is the script...it does not matter where I put it, the data comes up on a fresh page:
function LoadData()
{
var table = new Active.XML.Table;
// provide data URL
table.setURL("data/CallSummaryReport.xml");
// start asyncronous data retrieval
table.request();
var defaultResponse = table.response;
table.response = function(data){
defaultResponse.call(this, data);
document.write('<table width="60%">');
for (i = 0; i <table.getCount(); i++){
document.write('<tr>');
document.write('<td width="50%" bgcolor="#FFFF99" height="21">'+table.getText(i,0)+'</td>');
document.write('<td width="50%" bgcolor="#FFFF99" height="21">',i,'</td>');
document.write('</tr>');
}
document.write('</table>');
}
}
RS
April 15,