Hi guys, i'm wondering if you can help me out with an idea i've got.
I'm building an insurance quote popup window, and some tasks can take a little time to process so i'm thinking of building a 'Loading...' page that'll appear in between each screen.
So when a customer for example clicks 'Log In', the screen will go white with a loading image in the middle, then Ajax or something similar calls a PHP script (while the user is looking at a loading icon), and once the php has been executed redirect the browser.
Do you think this is a good way of doing it? Does anyone have any example URL's? I've tried looking but haven't found any that do what I need.
Loading Page.....
Moderator: General Moderators
Re: Loading Page.....
Hello,
Please find the following link,
http://thybag.co.uk/index.php?p=Tutorials&ind=44
Here we have the coding and steps to Ajax page Loading.
Please find the following link,
http://thybag.co.uk/index.php?p=Tutorials&ind=44
Here we have the coding and steps to Ajax page Loading.
Re: Loading Page.....
Thanks but that's not really what i'm looking for...
I've come up with the following script that does exactly what i'm looking for:
Post it here for your comments or as help to others
I've come up with the following script that does exactly what i'm looking for:
Code: Select all
<?php
// Construct the data as a string
foreach($_POST as $key => $value) {
$variables .= $key . "=" . $value . "&";
}
$variables = substr($variables, 0, strlen($variables)-1);
//echo $variables; die();
?>
<html>
<head>
<title>Processing</title>
<script type="text/javascript" src="/jscript/jquery-1.3.2.js"></script>
<!-- http://docs.jquery.com/Ajax/load -->
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
type: "POST",
url: "code/<?php echo $_GET['action']; ?>.php",
data: "<?php echo $variables; ?>",
success: function(msg){
window.location=msg;
//widnow.alert( "Data Saved: " + );
}
});
});
</script>
</head>
<body>
<div style='width:100px; height:100px; margin:230px auto 0px auto;'>
<img src="images/ajax-loader-blue.gif" border="0">
</div>
</body>
</html>