Hello,
What I got here is a Ajax.Updater prototype js function. It's working perfectly this way:
new Ajax.Updater('feedback', 'contact.php', {
method: 'post',
parameters: Form.serialize($('contactForm')),
onFailure: reportError
});
But I want to delay the process a bit. I asked around on the prototype irc channel and this seems the way to go:
var feedback = function() {
new Ajax.Updater('feedback', 'contact.php', {
method: 'post',
parameters: Form.serialize($('contactForm')),
onFailure: reportError
});
new Effect.Highlight('feedback', {
duration: 1
});
}
feedback.delay(1.5);
(don t mind the scriptaculous effect)
There is a echo function in contact.php that looks like this:
echo("Thanks for your message $_POST['Name']!");
After applying the delay the name is no longer echoed! What's wrong?