On Apr 22, 2:47 am, revivedk <[EMAIL PROTECTED]> wrote:
> Hi. Im using a Ajax.Request to load some content to a div.
> I would like to trigger a function after the content has been loaded
> into the div, in order to resize the div to fit the new content.
> But, For now it seems to trigger my function before the content has
> been loaded.
>
> var opt = {
> // Handle successful response
> onSuccess: function(t) {
> $('uBoxContent').innerHTML =
> t.responseText;
> },
> // Handle 404
> on404: function(t) {
> alert('Error 404: location "' +
> t.statusText + '" was not
> found.');
> },
> // Handle other errors
> onFailure: function(t) {
> alert('Error ' + t.status + ' -- ' +
> t.statusText);
> }
> }
>
> new Ajax.Request(ContentUrl, opt);
> new uBox.Resize();
>
> Is there any way, to trigger the uBox.Resize(); AFTER the content has
> been loaded into the uBoxContent div?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---