It's progress at least...
But we're doing it wrong.
The AJAX call is returning the name of the page your supposed to redirect to ("confirmation.html") but we're setting up the script as though we're expecting to receive HTML code.
So... instead of setting it up like this:
Code:
onComplete: function(response)
{
$('mb_inline').getChildren().destroy();
$('mb_inline').adopt(response);
Mediabox.open('#mb_inline','aaa','300 200');
$$('input[type=submit]').set('disabled', false);
}
The mediabox docs say we could do this instead:
Code:
onComplete: function(response)
{
// Just pass the URL directly...
Mediabox.open(response,'aaa','300 200');
$$('input[type=submit]').set('disabled', false);
}
So try that one out.
As far as how to debug AJAX, I'm using Firebug. Open the console, and every call logs an entry that you can expand and see what's being sent and what you're getting back. Other browsers like Chrome should some similar "developer tools" baked in.
Bookmarks