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

  • Home
  • SEARCH
  • 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 8364177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:22:10+00:00 2026-06-09T12:22:10+00:00

here is my ajax call // send the data to the server using .ajax()

  • 0

here is my ajax call

// send the data to the server using .ajax() or .post()
        $.ajax({
            type: 'POST',
            url: 'addVideo',
            data: {
                video_title: title,
                playlist_name: playlist,
                url: id
                // csrfmiddlewaretoken: '{{ csrf_token }}',
            },
            success: function(response, textStatus, jqXHR){
                 bootstrap_alert.success('video saved successfully');
            },

            // callback handler that will be called on error
            error: function(jqXHR, textStatus, errorThrown){
                bootstrap_alert.error('There were some errors while saving the video. Please try in a while');
            },
        });

and notification function

// setting up alerts on action
bootstrap_alert = function() {}
bootstrap_alert.success = function(message) {
  $('#feature').prepend('<div id="alert" class="alert alert-success"><!--a class="close" data-dismiss="alert">×</a--><span>'+message+'</span></div>');
  $('#alert').fadeOut(3000);
}
bootstrap_alert.error = function(message) {
  $('#feature').prepend('<div id="alert" class="alert alert-error"><!--a class="close" data-dismiss="alert">×</a--><span>'+message+'</span></div>');
  $('#alert').fadeOut(3000);
}
  • When I ajax call returns I see a div for 3 seconds and it goes away BUT then, my page moves up very quickly, I want to make this transition smooth

  • is it possible to layer the notification div on top of feature div which disappears after 3 seconds?

  • 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-09T12:22:11+00:00Added an answer on June 9, 2026 at 12:22 pm

    You could use sliding effects to make it nice. You could insert the content, slide it down, wait 3 seconds, then slide it up.

    var x =$("<div class='alert'>Alert</div>");
    $("#c1").prepend(x);
    x.slideDown(250).delay(3000).slideUp(250);​
    

    Sample fiddle: http://jsfiddle.net/johnkoer/gxbTJ/15/

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

Sidebar

Related Questions

Here's my ajax call: $.ajax({ url: 'url-to-json', type: 'POST', dataType: 'json', cache: 'false', data:
I have this ajax call at the moment: $.ajax({ url: misc/sendPM.php, type: POST, data:
I'm having trouble to display data after form submition using JS and AJAX here
Here is how I am submitting my ajax request : $.ajax({ url: myurl, type:
I need to send some of my data into another server. Actually to post
I'm trying to send some data via JQuery ajax to a grails controller Here's
I'm struggling to get a $.ajax call to correctly send some form data to
I am doing an AJAX call that returns some HTML and jQuery: <div id='selected'>Here
I am getting an error in an ajax call from jQuery. Here is my
How to get array data from json in c#? Here is the ajax code

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.