manugoel2003
18 Jan 2007, 2:08 AM
Hi,
I have already followed the following 2 threads -
http://www.yui-ext.com/forum/viewtopic.php?p=8186
http://www.yui-ext.com/forum/viewtopic.php?p=8125
But it didn't help much. I am posting a simplified version of my code here
<div id="sample"></div>
<script language="JavaScript">
var dh = YAHOO.ext.DomHelper;
dh.append('sample', {
tag: 'table',
id: 'myTable',
cellspacing: '0px',
cellpadding: '0px',
align: 'center',
border: '1px'
});
row = YAHOO.ext.DomHelper.createTemplate({
tag: 'tr',
children: [{
tag: 'td',
title: '{tooltip}',
html: '{label}'
},{
tag: 'td',
title: '{tooltip}',
html: '{label}'
}]
});
row.append('myTable', {label: 'First Row', tooltip: 'First Row'});
row.append('myTable', {label: 'Second Row', tooltip: 'Second Row'});
row.append('myTable', {label: 'Third Row', tooltip: 'Third Row'});
row.append('myTable', {label: 'Fourth Row', tooltip: 'Fourth Row'});
</script>
what it does is, it inserts multiple tbody tags in the table, which shows fine on FF but disappears completely on IE.
To make it work on IE I made a slight change
var tbody = getEl('myTable').dom.tBodies[0];
row.append(tbody, {label: 'First Row', tooltip: 'First Row'});
row.append(tbody, {label: 'Second Row', tooltip: 'Second Row'});
row.append(tbody, {label: 'Third Row', tooltip: 'Third Row'});
row.append(tbody, {label: 'Fourth Row', tooltip: 'Fourth Row'});
But now it does not work in FF
Anybody has any suggestions??
I have already followed the following 2 threads -
http://www.yui-ext.com/forum/viewtopic.php?p=8186
http://www.yui-ext.com/forum/viewtopic.php?p=8125
But it didn't help much. I am posting a simplified version of my code here
<div id="sample"></div>
<script language="JavaScript">
var dh = YAHOO.ext.DomHelper;
dh.append('sample', {
tag: 'table',
id: 'myTable',
cellspacing: '0px',
cellpadding: '0px',
align: 'center',
border: '1px'
});
row = YAHOO.ext.DomHelper.createTemplate({
tag: 'tr',
children: [{
tag: 'td',
title: '{tooltip}',
html: '{label}'
},{
tag: 'td',
title: '{tooltip}',
html: '{label}'
}]
});
row.append('myTable', {label: 'First Row', tooltip: 'First Row'});
row.append('myTable', {label: 'Second Row', tooltip: 'Second Row'});
row.append('myTable', {label: 'Third Row', tooltip: 'Third Row'});
row.append('myTable', {label: 'Fourth Row', tooltip: 'Fourth Row'});
</script>
what it does is, it inserts multiple tbody tags in the table, which shows fine on FF but disappears completely on IE.
To make it work on IE I made a slight change
var tbody = getEl('myTable').dom.tBodies[0];
row.append(tbody, {label: 'First Row', tooltip: 'First Row'});
row.append(tbody, {label: 'Second Row', tooltip: 'Second Row'});
row.append(tbody, {label: 'Third Row', tooltip: 'Third Row'});
row.append(tbody, {label: 'Fourth Row', tooltip: 'Fourth Row'});
But now it does not work in FF
Anybody has any suggestions??