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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:14:09+00:00 2026-06-05T22:14:09+00:00

I am trying to build a web application, where I have abstracted logic in

  • 0

I am trying to build a web application, where I have abstracted logic in a Javascript controller class. I want to minimize function calls outside of that class.

Once in a page in my application, whenever a user performs a task, I want the mark a previous action as completed on my server. So I call a method in my Javascript class e.g. EndTask(id), which in turn sends out an ajax command to the server. No I want to wait for a response to my ajax command before allowing the user to proceed further.

I also want to ensure that my Javascript API is kept to a minimum and the page do not have to register any callback.

So in essence, I would like to call just EndTask(), and when the function returns, the page would understand that the whole process of marking the task as completed has been performed.

Is there any way to do this in Javascript, without marking the ajax call as synchronous?

  • 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-06-05T22:14:10+00:00Added an answer on June 5, 2026 at 10:14 pm

    It is possible to make an asynchronous function synchronous in JavaScript but to do so you would need to make use of generators which are currently only supported by Firefox.

    I would suggest that you synchronous AJAX calls and fall back on generators in Firefox since it doesn’t support synchronous XMLHttpRequest objects. Beware however that this might lead to redundancy in your code.

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

Sidebar

Related Questions

I am trying to have my web application automatically Publish when a Release build
im trying out to build a web application. it must have contain a login
I have been trying to build a modular web application. My requirements are to
I have a web application that I am trying to build and publish. The
I'm trying to build a 4-tier Web-Application in Java. I'm using the Hibernate Framework
I'm trying to build a single page web based application, so the entire UI
I'm trying to build the proxy class for a web service using the wsdl
I am trying to build a web application that requires users to register themselves.
I am trying to build a .NET web application using SQL to query AS400
I am trying to build a web service to interact with a mobile application

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.