Ok basically i have a contact form submission system.
All the variable names are correct as i have already tested them so that cant be the problem.
When i run that function it goes straight to the failure message.HTML Code:function sendcontact() { var type = document.getElementById("contact_type").value; var subject = document.getElementById("contact_subject").value; var email = document.getElementById("contact_email").value; var message = document.getElementById("contact_message").value; var sent = function() { document.getElementById("contact_form").innerHTML = "We have recieved your contact submission successfully!<br /><br />Please allow 72 hours for a reply."; } var fail = function() { document.getElementById("contact_form").innerHTML = "Sorry, an error occured!<br /><br />If this keeps happening, please let us know by emailing <a href='mailto:[email protected]'>here</a> otherwise please try again later.<br /><br />We apologize for any inconvenience caused."; } var loaded = function() { } new Ajax.Request('contactus.php',{postBody:'?send=send&type=' + type + '&subject=' + subject + '&email=' + email + '&message=' + message + '', method:'post', onLoaded:loaded, onSuccess: sent, onFailure: fail}); }
Any ideas whats wrong.
Ive tried commenting out the sending code on the contactus page but that doesnt make a difference.
Thanks for any help!![]()





Reply With Quote


