T
Tom de Neef
I have a JavaScript function which extracts data from a genealogical html
page and produces a layout chart of the family relationships which is then
inserted in the page.
It works fine on my testpages, which do not have a DOCTYPE (just start with
<html>). The function is called from <body onload='functionCall()'>.
The production site has pages which start with
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><head <html
xmlns="http://www.w3.org/1999/xhtml">
Here, the chart is produced but all elements of the chart fall on each other
with FF and Chrome (IE8 does fine).
The function inserts nodes in the DOM. These nodes are created using:
function newNode(x,y,width,height) {
var node = document.createElement('div');
node.style.position='absolute';
node.style.left = xOffset+x;
node.style.top = yOffset+y;
node.style.width = width;
node.style.height = height;
return node;
}
(xOffset and yOffset are global to the encapsulating function.)
It appears that the positioning and size info will not be interpreted with
this Transitional XHTML 1.0.
The page was successfully checked as valid XHTML.
I hope this is enough info for an advice how to modify.
Thank you,
Tom
page and produces a layout chart of the family relationships which is then
inserted in the page.
It works fine on my testpages, which do not have a DOCTYPE (just start with
<html>). The function is called from <body onload='functionCall()'>.
The production site has pages which start with
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><head <html
xmlns="http://www.w3.org/1999/xhtml">
Here, the chart is produced but all elements of the chart fall on each other
with FF and Chrome (IE8 does fine).
The function inserts nodes in the DOM. These nodes are created using:
function newNode(x,y,width,height) {
var node = document.createElement('div');
node.style.position='absolute';
node.style.left = xOffset+x;
node.style.top = yOffset+y;
node.style.width = width;
node.style.height = height;
return node;
}
(xOffset and yOffset are global to the encapsulating function.)
It appears that the positioning and size info will not be interpreted with
this Transitional XHTML 1.0.
The page was successfully checked as valid XHTML.
I hope this is enough info for an advice how to modify.
Thank you,
Tom