Title: Submitting comments within a facebox window
Last modified: August 20, 2016

---

# Submitting comments within a facebox window

 *  [pacothelovetaco](https://wordpress.org/support/users/pacothelovetaco/)
 * (@pacothelovetaco)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/submitting-comments-within-a-facebox-window/)
 * 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)

 *  Thread Starter [pacothelovetaco](https://wordpress.org/support/users/pacothelovetaco/)
 * (@pacothelovetaco)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/submitting-comments-within-a-facebox-window/#post-2311954)
 * Nothing?

Viewing 1 replies (of 1 total)

The topic ‘Submitting comments within a facebox window’ is closed to new replies.

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [facebox](https://wordpress.org/support/topic-tag/facebox/)

 * 1 reply
 * 1 participant
 * Last reply from: [pacothelovetaco](https://wordpress.org/support/users/pacothelovetaco/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/submitting-comments-within-a-facebox-window/#post-2311954)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
