Hello everyone!I need to get the height of a div after i updated it's
content on a ajax update. The problem is that it't returns 0.
(I need to get the height because i'm wringing a costumized
pagescroller).
The code is:
function open_page(page_name)
{
new Ajax.Request(page_name, {
method:'get',
onSuccess: function(transport){
var page = transport.responseText.evalJSON();
var newBg = "url("+ page.bg +")";
$('Container').style.backgroundImage =
newBg;
$('toScroll').innerHTML = page.content;
$('PageTitle').innerHTML = page.title;
$('toScroll').style.top = '0px';
new Effect.BlindDown('Content');
alert($('toScroll').offsetHeight);
}
});
}
The alert returns 0.
I've tried to set the height: auto in the CSS but it chnages nothing.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---