Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 152331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:36:15+00:00 2026-05-11T09:36:15+00:00

I have a site where each user’s page shows comments and allows other user’s

  • 0

I have a site where each user’s page shows comments and allows other user’s to add comments. I want to have it so the add comments form is on the page and when a user adds a comment, it is added to the database and shows up in the comment section with AJAX. I am using jQuery for the AJAX and LINQ to SQL to handle the database logic. How would go about doing this so that after the comment is added to the database, the comments section is refreshed and updated without refreshing the page?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:36:16+00:00Added an answer on May 11, 2026 at 9:36 am

    You would need to take advantage of the ‘success’ (or ‘complete’) event that is fired by the jQuery ajax call to fire a subsequent AJAX call for refreshing the content of your reviews. This would probably look something like (winged it, untested):

    function UpdateComments(){     resultHTML = jQuery.ajax({         type: 'GET',         url: 'Comments/List/UserID'     }).responseText;      $('#comments').html(resultHTML); }  function PostComment(targetUserID, commenterUserID, comment) jQuery.ajax({         type: 'POST',         contentType: 'application/json; charset=utf-8',         data: $.toJSON({review: comment, id:targetUserID, commenter:commenterUserID}),         dataType: 'json',         url: 'Comments/Add',         success: function(result){             // Only update comments if the post was successful:             resultJson = $.evalJSON(result);             if(resultJson['success'] == true){                 UpdateComments();                                 }         }     }); 

    EDIT The JSON code would make use of the jquery plugin jquery-json (http://code.google.com/p/jquery-json/)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want a customized home page for each user of my site. I was
I have a site with a bunch of categories. On each category archive page,
We have over 10,000 registered users on our site and want to associate each
I have created a site which has some roles. and each user can have
I have built a site that when a user fills in a form correctly
I have a php site. I want to store an last ip for each
I'm building a website in Django. I want each user of the site to
I have a site with thousands of users. Each user have an unique ID,
I have a site that allows users to vote on images. Each image has
On my site I have user profiles. Each user profile can have a number

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.