Thanks Tom, I modified it to what you said. But now it doesn't create the loader, and I know its executing the create_year function because I put in an alert to test it but it doesn't perform anything past that.
Modified: new Ajax.Request('timeline_backend.php', { method: 'get', parameters: {action: 'year', year: request_year}, onCreate: create_loader, onFailure: function () {alert("Oops!");}, onSuccess: create_year }); On Mar 18, 6:36 pm, Tom Gregory <[EMAIL PROTECTED]> wrote: > You are not passing function references to the callbacks as you > perhaps intend. You are instead passing the results of functions. > > Modify these lines: > onCreate: create_loader, // No parenthesis > onFailure: function () {alert("Oops!");}, // anonymous function > onSuccess: create_year // Again, use a function reference, not a > function result > > TAG > > On Mar 18, 2007, at 4:32 PM, andymadonna wrote: > > > > > Hi, I'm new to using Prototype. I trying to use Ajax to make an > > interactive timeline of the 60s, but my Ajax request keeps failing. > > > I have it on my live site for testing: http:// > > the60s.andrewmadonna.com/timeline.html > > > Here is a code snippet of the actual request: > > > new Ajax.Request('timeline_backend.php', { > > method: 'get', > > parameters: {action: 'year', year: request_year}, > > onCreate: create_loader(), > > onFailure: alert("Oops!"), > > onSuccess: create_year(transport) > > }); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---