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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:22:43+00:00 2026-05-31T23:22:43+00:00

In my page I use ajax loader gif. When the button is clicked the

  • 0

In my page I use ajax loader gif. When the button is clicked the ajax loader is shown, however the text below it moves to upwards and I want them to be constant I mean not to move.
Is there a way to do this? Thanks for help.

It can be seen from here as well:

http://www.dilyurdu.com

function AjaxLoader()
{
    document.getElementById("translation").innerHTML="<img src='ajax-loader.gif' />"

    $.ajax({
        type: "POST",
        url: "test1.php",           
        success: function(response) {

          $("#translation").html("hello");

        }

    });


}

<div class="informationArea">
     <h2><span id="infoaream">caballo</span></h2>
     <div id="wordDetailArea">
        <h2>Translation:</h2><p><span id="translation">dog</span></p>
        <h2>Context:</h2><p><span id="context">I have got a dog.</span></p>
     </div>       
</div>

  • 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-31T23:22:45+00:00Added an answer on May 31, 2026 at 11:22 pm

    This is because the height of <p> tag changes according to its content.

    The fix is to use a fixed height.

    <p style="height: 25px;"><span id="translation">dog</span></p>
    

    Note: As of ajax request the length of your content may not be consistent. So you should choose a highest value for height

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

Sidebar

Related Questions

I want to use an ajax loader while loading the page with transparent background.
I have a webforms page that makes quite extensive use of AJAX. There are
I use a plug-in called nyroModal to call a page via AJAX and display
When i use jquery's $.post ajax function, page freezes for 2-3 seconds and then
On my current page I use old file upload with input element. However, now
I load external content to replace a DIV. Problem is, when the ajax-loader.gif replaces
I need to use AJAX to get the content of another page located on
How can I use AJAX to run a PHP file when the page is
I have a page that automatically refreshes content via Ajax. I want this to
I have a page which acts as an AJAX loader using jQuery. It fetches

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.