EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

Executing JavaScript after page-load in MicroStrategy Web


Community Admin

• Strategy


JavaScript snippet demonstrating how to execute custom JavaScript after the page loads, rather than immediately during page load.

Custom JavaScript can be added to any page in Strategy Web. Default behavior is that any additional JavaScript is executed as soon as it is read. This snippet demonstrates a method for only executing custom logic once the page DOM has finished loading, ensuring all other resources that the JavaScript might rely on have also loaded.


function myCustomJSFunction() {
	document.onreadystatechange = function() {
		if (document.readyState == "complete") {
			// logic after page finishes loading
		}
	};
};

myCustomJSFunction();

Use the New JavaScript Wizard to add new JavaScript to a Strategy Web page. 
 


Comment

0 comments

Details

Example

Published:

May 11, 2017

Last Updated:

February 13, 2024