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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:31:55+00:00 2026-06-05T20:31:55+00:00

EDIT: iam using ajax to load text in my content that is why onload

  • 0

EDIT: iam using ajax to load text in my content that is why onload on head is not applicable.

I have an almost complete project here
http://sandbox.littlegraffyx.com/bible/test2.html (enter gen 1:1 on bottom left to start)

The only problem I have is to ensure that my main div where the main text is displayed is fully loaded before I call a function that will autofit the text content on the window.

There are times that my autofit function is working and there are times it isn’t and the only reason I can think of why it’s not working is maybe the div isn’t fully loaded yet when I call the function.

echo "<div id=\"verse\">" . $bcontent . "</div>";

echo "<script type='text/javascript'>
    scaleQuote();";
echo "</script>";

The scalequote sample is found in my other question here

Adjust size based on height (vertical length)

Here are the searches I made and I can’t see how can I apply the solutions offered in these post in my case that is why I am asking one myself. Hoping I will not be down voted for “lack of research”

How do I run a function only when a div gets loaded?

getting the height and width of a div after loading info into it from an external source with jquery

thanks in advance and sorry for my english

File references

http://pastebin.com/wwQumwKJ – my JS file

http://pastebin.com/FnyST8iz – my html file

http://pastebin.com/BYfSUjQJ – my css file

Except from getting the database contents, my php file is pretty much what is posted above.

  • 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-05T20:31:56+00:00Added an answer on June 5, 2026 at 8:31 pm

    Short answer

    Inside your MovePrevious() function, add scaleQuote(); inside the Ajax’s callback:

    document.getElementById("versePlace").innerHTML=xmlhttp.responseText;
    scaleQuote(); //<-- here
    

    Long Answer

    You’re using standard JS on your Ajax calls. Standard Ajax calls such as yours, which simply places the response HTML inside an element with innerHTML does not execute any script tags inside of the response text. It’s different than jQuery’s append/appendTo methods, which parse any script tags inside of your response text and executes it upon being added to the DOM.

    Why does it work “most of the time” then?

    Because your MoveNext() function already has a scaleQuote(); function call inside of its callback.

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

Sidebar

Related Questions

EDIT: I am using VS2008, .NET 3.5 I have a DataTable, which is populated
[edit] I am NOT using jquery in this app. Looking for a way to
Edit I think there is some confusion, I am not using both of the
I have a page (page1.php) where I am using a select box to load
I am using ASP.NET MVC C# I have a jQuery call that deletes a
I have a php script that gets user input (some text and a link),
I am planning to load JS files using AJAX and then eval them to
i am using the code: $('#stream').delegate('.load','click',function(){ //DO ACTIONS HERE }); but when the content
I have the following file file: <html> <head> <title></title> <script type=text/javascript src=/Prototype.js></script> <script type=text/javascript>
Here is a hum-dinger of a problem that I have not found an answer

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.