PDA

View Full Version : Ext.util.CSS.updateRule does not work in IE



extbio
14 Jul 2009, 12:07 PM
This seems to have been mentioned by other posters before but no solution proposed that I could find. I would appreciate it if you could help! I'm very open to suggestions that could either solve the issue without using updateRule or those that make updateRule work in IE (after all, Ext is cross-browser, so updateRule should work in IE if it's correctly called). Thanks much!


<head>
<style type="text/css">
td
{
width:7px;
height:7px;
text-align:center;
font-size:0.4375em;
font-weight:bold;
font-family:sans-serif;
}
</style>
<script type="text/javascript" src="/ext-2.2.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/ext-2.2.1/ext-all-debug.js"></script>
<script>
function resizeTD()
{
Ext.util.CSS.updateRule('td','width','16px');
Ext.util.CSS.updateRule('td','height','16px');
Ext.util.CSS.updateRule('td','font-size','1em');
// in case one wonders, calling refreshCache() here does not help

// the following works but 1.I will load table content dynamically, it'd be nicer
// if the table displays correctly right away without having to use select,
// setStyle to fix displayed size. 2. I prefer not to set style of so many tds
// as actual table might contain thousands of cells.
// Ext.select('td').setStyle({width:'16px',height:'16px','font-size':'1em'});
}
</script>
</head>
<a href="javascript:resizeTD()">click here to resize table cells</a>
<table id="mytable">
<tr><td>ab</td><td>ab</td><td>ab</td><td>ab</td><td>ab</td></tr>
<tr><td>ab</td><td>ab</td><td>ab</td><td>ab</td><td>ab</td></tr>
<tr><td>ab</td><td>ab</td><td>ab</td><td>ab</td><td>ab</td></tr>
</table>