logo       

Scaling question: msg#00127

lang.ruby.rails.spinoffs

Subject: Scaling question

I created a simle script for a webpage I'm working on that updates a
small div of text every so often. The text varies greatly in length,
so I would rather use an effect so the div collapses->the text is
updated-> the div uncollapses. My code below, however, doesn't work.
After testing, I realize that it isn't scaling to 100% of the text
height, but 100% of another value. What would be the best way to fix
this?

My code:
var offset = 0;
function fadeIn(r)
{ $("currentaside").innerHTML = r.responseText;
new Effect.Scale("currentaside", 100.0, {scaleX: false,
scaleFrom: 50, scaleContent: false});
}
function getData()
{
new Ajax.Request("./aside.php?fromcat=2&offset=" +
offset, {onComplete: fadeIn});
}
function refresh()
{ offset++;
new Effect.Scale("currentaside", 50, {scaleX: false,
afterFinish: getData, scaleFrom: 100, scaleContent: false});
}
getData();
new PeriodicalExecuter (refresh, 10);


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise