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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:40:50+00:00 2026-06-10T03:40:50+00:00

I have some web app. It is desktop based. I have an issue where

  • 0

I have some web app. It is desktop based. I have an issue where the action is getting canceled before I save my data. I am using an unload event in javascript to send some data to mixpanel (just some ajax call). The problem is that I believe that this request gets “cancelled” on occasion.

Is there a way to prevent the page from changing until I get to a callback? I feel like the answer is a no unless I am able to make the call synchronous. I don’t think I have that ability with mixpanel.

I am currently using the unload event in mootools. I should probably use beforeunload? Is there a way to tell unload that I am done?

  • 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-10T03:40:51+00:00Added an answer on June 10, 2026 at 3:40 am

    The short answer is no. Synchronous ajax would appear to be the only reliable option here.

    If you’re controlling the client-side code, it’s easy to make it synchronous. Simply add async: false ton your Request options. The server won’t care.

    One potential gotcha for those of us accustomed to writing asynchronous ajax: Nothing after the Request.send() call will get executed until after the onComplete handler is done. This means that details such as displaying “Please wait…” have to appear first in the code. With asynchronous requests, the order obviously doesn’t matter, and it’s common to send the request first.

    As for beforeunload, it’s probably not useful here. The value of beforeunload is to allow the user to cancel the impending page load. If you don’t need this functionality, go with unload.

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

Sidebar

Related Questions

I'm working on a class-based php web app. I have some places where objects
I have a web app using Hibernate, and I am attempting to persist some
I have a web app (MVC) where I need some automatic service to run
I have C# MVC web app that has some textboxes that in IE9 you
I have been asked to implement some email address validation on a web app
So I have this php web app, and one of my folder contains some
In my app i have access to web server. It works fine in Some
I have a desktop app (.net 3.5) which communicates with the server using classic
I've tried various editors, both desktop applications and web-based RTEs, but have not found
I have a web app which has standard things for learning based app like

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.