CSS dropped
Hello,
I am having an issue with my grid. It finds the data perfectly, but it doesn't seem to load the css at all. All my directories are correct, and when I use the examples everything, including css, works. So, I am assuming I am doing something wrong, just not sure what. I have posted my code so everyone can take a look. Any help at all would be helpful.
Thanks!
Joe
--HTML-----
<html>
<head>
<title>Twain and xAx Demo</title>
<link rel="stylesheet" type="text/css" href="/jcianflone/awtwain/javascripts/runtime/styles/aqua/aw.css" />
<script type="text/javascript" src="/jcianflone/awtwain/javascripts/config.js"></script>
<script type="text/javascript" src="/jcianflone/awtwain/javascripts/x.js"></script>
</head>
<body>
<input type="button" onclick="generatePage()" value="go"/>
</body>
</html>
-- JAVASCRIPT ---
var obj = new AW.UI.Grid;
function generatePage () {
var url = GLOBAL_SERVICES_URL+"getComponents.php?";
var params = "type=acute&userid=164236";
var myAjax = new Ajax.Request (
url,
{
method: 'get',
parameters: params,
onSuccess: doLogin
}
);
}//generatePage()...
function doLogin (response) {
//get XML
var res = response.responseXML;
//get first x
var xArray = res.getElementsByTagName("x");
var i = 9;
var m = 10;
var dataArray = new Array();
var l = 0;
//document.write ("<table border=1>");
for (var j=9; j < 20; j++) {
//document.write("<tr>");
dataArray[l] = new Array(4);
for (var k=0; k < 4; k++) {
var test = xArray[m].getAttribute("value");
if (test == null || test=="" || test == " ") {
m++;
k--;
}
else {
// document.write ("<td>")
dataArray[l][k] = test;
// document.write (dataArray[l][k]);
// document.write("</td>");
m++
}
}//for...
l++;
// document.write("</tr>");
}//for...
// document.write("</table>");
var myData = dataArray;
// alert (dataArray[0]);
var myColumns = ["Beds Available", "Last Updated", "Updated By", "All Hospitals"];
//obj.setId("myGrid"); // necessary for CSS rules
obj.setCellText(dataArray); // 2-dimensional js array
//obj.setCellEditable(true); // enable editing
obj.setHeaderCount(1);
obj.setHeaderText(myColumns); // js array (see top of this page)
obj.setColumnCount(dataArray[0].length);
obj.setRowCount(dataArray.length);
obj.setSelectorVisible(true);
//obj.setSelectorText(function(i){return this.getRowPosition(i)+1});
alert ("ready to write obj");
document.write(obj);
alert ("wrote obj");
}
I am having an issue with my grid. It finds the data perfectly, but it doesn't seem to load the css at all. All my directories are correct, and when I use the examples everything, including css, works. So, I am assuming I am doing something wrong, just not sure what. I have posted my code so everyone can take a look. Any help at all would be helpful.
Thanks!
Joe
--HTML-----
<html>
<head>
<title>Twain and xAx Demo</title>
<link rel="stylesheet" type="text/css" href="/jcianflone/awtwain/javascripts/runtime/styles/aqua/aw.css" />
<script type="text/javascript" src="/jcianflone/awtwain/javascripts/config.js"></script>
<script type="text/javascript" src="/jcianflone/awtwain/javascripts/x.js"></script>
</head>
<body>
<input type="button" onclick="generatePage()" value="go"/>
</body>
</html>
-- JAVASCRIPT ---
var obj = new AW.UI.Grid;
function generatePage () {
var url = GLOBAL_SERVICES_URL+"getComponents.php?";
var params = "type=acute&userid=164236";
var myAjax = new Ajax.Request (
url,
{
method: 'get',
parameters: params,
onSuccess: doLogin
}
);
}//generatePage()...
function doLogin (response) {
//get XML
var res = response.responseXML;
//get first x
var xArray = res.getElementsByTagName("x");
var i = 9;
var m = 10;
var dataArray = new Array();
var l = 0;
//document.write ("<table border=1>");
for (var j=9; j < 20; j++) {
//document.write("<tr>");
dataArray[l] = new Array(4);
for (var k=0; k < 4; k++) {
var test = xArray[m].getAttribute("value");
if (test == null || test=="" || test == " ") {
m++;
k--;
}
else {
// document.write ("<td>")
dataArray[l][k] = test;
// document.write (dataArray[l][k]);
// document.write("</td>");
m++
}
}//for...
l++;
// document.write("</tr>");
}//for...
// document.write("</table>");
var myData = dataArray;
// alert (dataArray[0]);
var myColumns = ["Beds Available", "Last Updated", "Updated By", "All Hospitals"];
//obj.setId("myGrid"); // necessary for CSS rules
obj.setCellText(dataArray); // 2-dimensional js array
//obj.setCellEditable(true); // enable editing
obj.setHeaderCount(1);
obj.setHeaderText(myColumns); // js array (see top of this page)
obj.setColumnCount(dataArray[0].length);
obj.setRowCount(dataArray.length);
obj.setSelectorVisible(true);
//obj.setSelectorText(function(i){return this.getRowPosition(i)+1});
alert ("ready to write obj");
document.write(obj);
alert ("wrote obj");
}
Joe C
May 1,