Active Server Pages Programming (ASP)/Onload

Advertisement


Question
I have a page that loads data from a database, then onclick of a button it displays all the totals required using a javascript function. Is there a routine where a couple of seconds after the page loads it can run my javascript functions to calculate my results, with out using the button?

Answer
Hello Mark,

You could try moving the javascript code to the end (bottom) of the page without necessarily giving it a function name as follows:

  ...
  </BODY>
</HTML>
<SCRIPT LANGUAGE="Javascript">
  'Calculate the totals here and display result
</SCRIPT>

Hope that helps. Thanks much and have a good day! Blessings... :)

Wil.

Active Server Pages Programming (ASP)

All Answers


Answers by Expert:


Ask Experts

Volunteer


Wilfred Mathews

Expertise

I possess more than 6 years of experience in using this wonderful technology from Microsoft, and this is proved by the fact that I hold a Master Certification in Active Server Pages Programming from Brainbench. I`m good at the use of VBScript, ADO Concepts, and Javascript. I`ve also programmed with Visual Basic for nearly 3 years (though not hardcore), and any questions related to developing Database Applications with VB are also welcome. Not much experience with .NET though.

Experience

Certified Master Active Server Pages Programmer from Brainbench

©2012 About.com, a part of The New York Times Company. All rights reserved.