Witam,

zrobiłem na bibliotece mootools rozwijane newsy. Na początku pokazują się 3, a po kliknięciu na "Więcej" div się rozwija i wyświetla wszystkie. Problemem jest to, że nie wiem jak określić na jaką wysokość ma się rozwijać. Funkcja wygląda tak:

Kod
function newsMore() {
    var request = new Request({
        url: 'ajax.php?newsmore',
        method: 'get',
        onRequest: function() {
            var height = $("newsMain").offsetHeight - 52;
            var table = '<table width="100%" height="' + height + '"><tr><td align="center" valign="middle"><img src="public/images/ajax-loader2.gif" /></td></tr></table>';
            createCookie('few', height, '');
            $('newsMain').set('html', table);
            var img = '<img src="public/images/newsFew.jpg" border="0" alt="Zwiń" usemap="#newsFew"/>';
            $('newsMore').set('html', img);
        },
        onComplete: function(response) {
            var h = readCookie('more') - 30;
        
            var myFx = new Fx.Elements($$('.newsMain'), {
            onComplete: function(){
                $('newsMain').set('html',response);
            }
            }).start({
                '0': {
                    'height': [490]
                }
            });
        }
    });
    request.setHeader('Content-Type','text/html; charset=utf-8');
    request.send();
}


Czy da się to jakoś inaczej rozwiązać?