Forum Replies Created

Viewing 1 replies (of 1 total)
  • Change line 9 of pfs-submit.php to read:
    ini_set('display_errors',0);

    I had the same problem and found that it was because PHP errors were displayed. When parseJSON() was called on line 27 of pfs-script.js it was printing HTML along with the JSON string which parseJSON cannot parse. The author must have used lines 8 & 9 on pfs-submit.php to debug.

    I display the success message similar to how error messages are displayed by changing the complete function in pfs-script.js to read:

    complete: function(request,textStatus,error) {
                    data = jQuery.parseJSON(request.responseText);
                    if (data && data.error) {
                    	//alert(data);
                        jQuery('#pfs-alert').addClass('error').html('<p>'+data.error+'</p>').show();
                        jQuery('.pfs-post-form #post').val('Post');
                    } else {
    		jQuery('form.pfs').reset();
                        jQuery('#pfs-alert').addClass('success').html('<p>'+data.success+'</p>').show();
                        jQuery('.pfs-post-form #post').val('Post');
                    }
    
    		jQuery('html, body').animate({ scrollTop: 0 }, 500);
    
                }

Viewing 1 replies (of 1 total)