• I am using facebox to show my posts, comments, fields and all. The problem I am having is whenever a comment is submitted through the facebox window, the page is redirected to a new page with the new comment. What I want is all of that to happen withing the facebox window.

    I’m new to Ajax. I was trying to run the process through Ajax and then replace the facbox content with the new content. This is what I was trying:

    function submit_form (){
       $.ajax({
       type:'post',
       url:"<?php echo site_url( '/wp-comments-post.php' ); ?>",
       data:$('form#commentform').serialize(),
       success:function(data){
    	//put the returned html into into a facebox popup
    	$('#facebox .content').empty();
            $('#facebox .content').html(data);
    	}
        });
    };

    Then updated the comment-template.php accordingly. Any thoughts? I hit a brick wall.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Submitting comments within a facebox window’ is closed to new replies.