Reg. GRID display problem with the doctype tag
Hello All,
I'm facing a problem with the Active widgets GRID when placing the following syntax in the page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
When i use the above code, which is a W3C standard, the other requirements of the page are working fine. Where as the active widgets grid is not displayed (The condition here is both the width and height of the page are specified as 100%).
If we specify the height and width of the GRID in pixels, without changing a single line of the code, the GRID is displayed.
Also, the same code is used and if the doc type tag is updated to the following with out the xml:lang="en" as
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="
http://www.w3.org/1999/xhtml">
the grid is working fine with the other parts of the designs distorted in the IE browser and some of the css and js are not working.
Please sugeest of how can i proceed with both the features working in both the browsers....
Thank you very much for your Help In Advance.
Raju
December 21,
When you are using % width/height in a page with a 'strict' doctype - make sure that the parent width/height is explicitly specified (not 'auto'). Otherwise 100% of 'auto' will result in zero width/height.
Alex (ActiveWidgets)
December 21,
PLeaseeeeeeeeeeee I need some help I'm trying to fill the grid from a msql db it return a blank page :(:(
<?php
require('DbConnection/DbConnet.php');
$query = 'SELECT * FROM tbllogin LIMIT 0,10';
$dataset = @mysql_query($query);
// print MySQL query results as 2D javascript array
function aw_cells($dataset){
$rows = array();
while ($record = @mysql_fetch_row($dataset)) {
$cols = array();
foreach ($record as $value) {
$cols[] = '"'.addslashes($value).'"';
}
$rows[] = "\t[".implode(",", $cols)."]";
}
echo "[\n".implode(",\n",$rows)."\n];\n";
}
// print MySQL field names as javascript array
function aw_headers($dataset){
while ($field = @mysql_fetch_field($dataset)) {
$cols[] = '"'.$field->name.'"';
}
echo "[".implode(",",$cols)."];\n";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ActiveWidgets Examples</title>
<!-- fix box model in firefox/safari/opera -->
<style type="text/css">
.aw-quirks * {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>
<!-- include links to the script and stylesheet files -->
<script src="../../runtime/lib/aw.js" type="text/javascript"></script>
<link href="../../runtime/styles/system/aw.css" rel="stylesheet">
</head>
<body>
<script type="text/javascript">
// insert javascript arrays produced by PHP functions
var myHeaders = <?= aw_headers($dataset) ?>
var myCells = <?= aw_cells($dataset) ?>
// create grid control
var obj = new AW.UI.Grid;
// set grid text
obj.setHeaderText(myHeaders);
obj.setCellText(myCells);
// set number of columns/rows
obj.setColumnCount(myHeaders.length);
obj.setRowCount(myCells.length);
// write grid to the page
document.write(obj);
</script>
</body>
</html>
Pascale
January 7,
PLeaseeeeeeeeeeee I need some help I'm trying to fill the grid from a msql db it return a blank page :(:(
<?php
require('DbConnection/DbConnet.php');
$query = 'SELECT * FROM tbllogin LIMIT 0,10';
$dataset = @mysql_query($query);
// print MySQL query results as 2D javascript array
function aw_cells($dataset){
$rows = array();
while ($record = @mysql_fetch_row($dataset)) {
$cols = array();
foreach ($record as $value) {
$cols[] = '"'.addslashes($value).'"';
}
$rows[] = "\t[".implode(",", $cols)."]";
}
echo "[\n".implode(",\n",$rows)."\n];\n";
}
// print MySQL field names as javascript array
function aw_headers($dataset){
while ($field = @mysql_fetch_field($dataset)) {
$cols[] = '"'.$field->name.'"';
}
echo "[".implode(",",$cols)."];\n";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ActiveWidgets Examples</title>
<!-- fix box model in firefox/safari/opera -->
<style type="text/css">
.aw-quirks * {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>
<!-- include links to the script and stylesheet files -->
<script src="../../runtime/lib/aw.js" type="text/javascript"></script>
<link href="../../runtime/styles/system/aw.css" rel="stylesheet">
</head>
<body>
<script type="text/javascript">
// insert javascript arrays produced by PHP functions
var myHeaders = <?= aw_headers($dataset) ?>
var myCells = <?= aw_cells($dataset) ?>
// create grid control
var obj = new AW.UI.Grid;
// set grid text
obj.setHeaderText(myHeaders);
obj.setCellText(myCells);
// set number of columns/rows
obj.setColumnCount(myHeaders.length);
obj.setRowCount(myCells.length);
// write grid to the page
document.write(obj);
</script>
</body>
</html>
Pascale
January 7,