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 6917507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:44:20+00:00 2026-05-27T09:44:20+00:00

I am creating a web application based on data using javascript. This data is

  • 0

I am creating a web application based on data using javascript. This data is stored as a js object and is constantly being updated using AJAX. The object has some methods to reorganize the data, such as sorting and filtering, as well as a method called render() which uses js templating to update the html to represent the data.

What I want is that every time the data object changes it automatically calls the render method to update the view. I know this can be done by just calling render() inside all my methods that modify the data, but I am looking for a cleaner way to do it.

I have read something about the observer pattern however I am not familiar with it and I don’t know if I can use that to achieve this. Also I know about the Object.watch() method but that is not supported by all browsers so I can’t use it.

Do you have any suggestions or examples about how can I do this?

Thanks.

  • 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. Editorial Team
    Editorial Team
    2026-05-27T09:44:21+00:00Added an answer on May 27, 2026 at 9:44 am

    Often, the flow is something like this:

    1. Call Ajax;
    2. On success return from the Ajax call, change the data;
    3. Then call render( ) once to render everything;
    4. Goto 1 after some interval or on some condition.

    That gives you one render ( ) call for each Ajax update, which is likely what you want.

    HTH

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

Sidebar

Related Questions

I'm creating a web based application (i.e. JavaScript with jQuery and lots of SVG)
I'm creating the server side implementation of an AJAX based web application, where the
I am creating a login application. Most of data is generated using a web
I'm creating a web based application using Java Server Faces (JSF). I'm just wondering
When creating a web application, and lets say you have a User object denoting
I'm creating a web application for work where the user has to enter the
I am creating a web application which has a few management screens, where a
I am creating a web application using zend, here I create an interface from
Has anyone tried implementing a web application with Clojure ( using Compojure ) and
I am creating a PHP based web application which requires simple authentication to use.

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.