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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:10:15+00:00 2026-06-08T20:10:15+00:00

I have the following javascript – function onLoad() { if (!(document.applets && document.VLVChart &&

  • 0

I have the following javascript –

function onLoad() {
    if (!(document.applets && document.VLVChart && document.VLVChart.isActive())) {
        setTimeout('onLoad()', 200);
        return;
    }
    objChart = document.VLVChart;
    PollEvent();
}

function fan() {
    objChart.reorganize();
}

And then when the HTML page is loaded –

<body onLoad="onLoad()">

and have a button within the HTML that execute the fan() function –

<input type='button' value='Fan' onClick='fan();'>

Is it possible for me to activate the fan() function within the onload event so that a user does ont have to click the button?

EDIT
After trying the provided answers, on debugging the code breaks on the line –

objChart.reorganize();

Within the fan() function with the error –

SCRIPT5007: Unable to get value of the property 'reorganize': object is null or undefined 

This is odd as when I manually click the button on the page, the function works fine.

Solution
After much head scratching I have realised that I was trying to load the fan() function before the page (and more specifically the objChart) had fully loaded. Hence why adding the function in the onLoad event was not working. I added a setTimeout –

function Fan()
{
setTimeout(function(){objChart.reorganize();},3000);
}
  • 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-08T20:10:19+00:00Added an answer on June 8, 2026 at 8:10 pm
    <body onload='onLoad(); fan();'>...
    

    However inline JS is best avoided and you would do well to begin looking into centralised event management. There are various advantages to this.

    An answer I wrote yesterday to another question outlines why this is. Something like jQuery makes this trivial if it’s new for you.

    $(function() {
        $('body').on('load', function() {
            onLoad();
            fan();
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Javascript code that works perfectly: $(document).ready(function() { $(#Select1).setDefault(); $(#Select2).setDefault(); $(#Select3).setDefault();
I have this following javascript to activate sometime document.addEventListener('touchmove', function (e) { e.preventDefault(); },
I have the following javascript code: if (url.match(/?rows.*?(?=\&)|.*/g)){ urlset= url.replace(/?rows.*?(?=\&)|.*/g,rows=+document.getElementById('rowcount').value); }else{ urlset= url+&rows=+document.getElementById('rowcount').value; }
I have the following JavaScript: var djs = function (ob) { return { remove:
I have the following javascript functions: function fun1() { ... return 'Over'; } function
I have the following Javascript code: function checkIfValid(){ var form = document.createuserform; var valid
I have the following Javascript code: function checkIfValid(){ var form = document.createuserform; if(form.fName.value ==
I have the following Javascript function that should return an array of groups that
I have the following javascript code: game.bind('gameover', function(seconds) { setTimeout(function() { var rank =
I have following Javascript objects: function Alfa() { this.status=''; this.setStatus = function(value) { this.status=value

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.