if (isset($_POST['post'])) {
if ($mSecs >= .54075102806091) {
echo "Have A Good Day!";
echo '<script type="text/javascript">',
'spinWheel.startAnimation();',
'</script>';
sleep(4);
} else {
echo "Other";
echo '<script type="text/Javascript">',
'spinWheel1.startAnimation();',
'</script>';
sleep(4);
}
}
I am trying to delay the submission of the php form, but still run the javascript annimation. The sleep feature delays the submission, but it also delays the javascript... Any ideas on how to delay the submission of the php from without delaying the javascript annimation? Thanks for all responses
A simplest thing you can do to delay the process, for me I think is to create a loop inside the isset(),
for($i = 0; $i < 100; $i++){
// do something
}