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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---