Click here to Skip to main content
15,887,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I have been helped here with a code to show a 'Please wait' message while my web page is loading (mcsetup.php), I am using this code as part of the script,

//after <head>
<head>
<!—ref to ‘please wait message -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.js"></script>

<script>
//paste this code under the head tag or in a separate js file.
	// Wait for window load
	$(window).load(function() {
		// Animate loader off screen
		$(".se-pre-con").fadeOut("slow");;
	});
</script>

//after <body>
<!—ref to ‘please wait message -->
<body>
<div class="se-pre-con"></div>

//in css
.no-js #loader { display: none;  }
.js #loader { display: block; position: absolute; left: 100px; top: 0; }
.se-pre-con {
	position: fixed;
	left: 0px;
	top: 0px;
	width: 100%;
	height: 100%;
	z-index: 9999;
	background: url(http://smallenvelop.com/wp-content/uploads/2014/08/Preloader_11.gif) center no-repeat #fff;
}

As you see it's triggered when the web page is loading for the first time.
Now, after the web page loads, there is a form to be filled out by the user, when the user enters the first field of the form, an onchange() function calls the same web page url added with the php variable resulted from the first field data entry (
window.location = "mcsetup.php?enterfn=<?php echo $fn ?>" + "&mc=<?php echo $mc ?>" + "&mold10=" + mold10js + "&neck10=" + neck10js;
), and the web page reloads again, but this time the previous 'Please Wait' code is not working.
Any ideas?
Thank you

What I have tried:

I tried to replace the
load(function()
in the 'Please Wait' message with the onchange() function of the user data entry field in the form, but it's not working.
Posted
Updated 1-Oct-20 10:23am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900