Jump to content

stop javascript execution


Goose

Recommended Posts

First off, I think part of my problem here is that I am not sure which terms to use in order to search for this subject.

My problem:
I have a control panel on one of my websites that is all AJAX driven. When a user changes a setting the JavaScript fires on the "onchange" event. The JavaScript makes my http_request object, calls my server code, gets the result back, passes the result to another JavaScript function which takes care of the visual updates of what is happening with the AJAX call. If the AJAX call is successful this method displays an image with a check mark next to the form field. After 10 seconds I have that check mark fade away. This all works great.

However, if I successfully change a setting and then 5 seconds later I decide to change it again and that change is made successfully, the check mark displays, but then fades out early because of the first successful AJAX call.

Is there a way to when I get a successful AJAX call back to make sure that the function x isn't running for the setting that I just changed?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.