$('#myForm') .on('Valid', function (){ var name = $('input#name').val(); var email = $('input#email').val(); var message = $('input#message').val(); //Data for Massage var dataString = 'name=' + name + '&email=' + email + '&message=' + message; $.ajax({ type: \"POST\", url: \"scripts/mail.php\", data: dataString, success: function() { $('contactform').html(\"
\"); $('#thanks').html(\"

Danke

\") .append(\"

\" + name + \" wir versuchen dir so schnell wie möglich zu Antworten.

\") .hide() .fadein(1500); }, }); //ajax call return false; }) "; $content=renderPage();