<input class="answer" type="text" name="answer" size="16" value="<?php echo (isset(($_POST["answer"] )) ? htmlspecialchars($_POST["answer"]) : '' ?>" autocomplete="off">
<?php echo (isset(($_POST["answer"] )) ? htmlspecialchars($_POST["answer"]) : '' ?>
$.ajax({
url: '../php/action.php',
type: 'POST',
success: function(data) {
$('.answer').test(data);
});