(.*)<\/p>/); $('#wallresponse').html(''+ data[1] +''); } else { $('#wallresponse').html('An error occurred, please notify the administrator.'); } $('#submit_wall_post').attr('value', 'Submit'); $("#wall_post #author").attr('value', ''); $("#wall_post #comment").attr('value', ''); } , beforeSubmit: function(formData, jqForm, options) { // clear response div $('#wallresponse').empty(); for (var i=0; i < formData.length; i++) { if (!formData[i].value) { $('#wallresponse').html(''+'Please fill in the required fields.'+'