I am currently working on creating a form using ajaxForm from the jQuery Form Plugin.
var options = {
target: '#output', // target element(s) to be updated with server response
beforeSubmit: beforePost, // pre-submit callback
success: successPost, // post-submit callback
url: './registerEntry.php', // override for form's 'action' attribute
type: 'post', // 'get' or 'post', override for form's 'method' attribute
dataType: null, // 'xml', 'script', or 'json' (expected server response type)
clearForm: true, // clear all form fields after successful submit
timeout: 3000
};
$('#registerEntry').ajaxForm(options);
While attempting to alert the responseText, I noticed that the script is adding HTML tags to it. The registerEntry.php file only contains 'hello' in plain text, yet the response includes additional HTML formatting.
Is there a way to retrieve the response in plain text without any added HTML tags?