Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript redirect to thankyou page with self posting php email form. Pretty please :) Re: redirect to thankyou page with self posting php email form. Pretty please :)

#82413
rubistarr
Member

well, i think I may be about to admit that I have been defeated. I have been trying to figure this out for about 2 days now and just cant seem to get it working. here is my new code with a random guess of what to put in the data spot.

$(function(){
$('#form_submit').click(function(){

var input_name = $('#form_name').val(),
input_email = $('#form_email').val(),
input_subject = $('#form_subject').val(),
input_message = $('#form_message').val(),
response_text = $('#response');

response_text.hide();
response_text.html('Loading...').show();


$.post('http://getgraphixed.com/RSD_new/wp-content/themes/fullscreen_child/scripts/contact-process.php', {name: input_name, email: input_email, subject: input_subject, message: input_message}, function(data){
if ( data === '#form_submit' )
{
window.location = "http://www.google.com/"
}
else
{
response_text.html(data);
}

});
return false;
});

});

sigh. thanks for trying to help.