My current index.php page format is as follows:
<?php include ("header.php") ?>
Here is the page content
<?php include ("footer.php") ?>
I have a search form within header.php which actions search.php, search.php is the same format as above. After clicking submit search.php takes a little while to load due to its contents. I would love to use ajax to substitute the index content with the search content, displaying an image (loading.gif) whilst the search contents load; as I’ve seen other websites.
This is basically so my visitors know the page is in-fact loading and they need not click the submit button again lol.
So seeing as I have no real knowledge of ajax I’d very much appreciate some direction, any help would be much appreciated 🙂
It can be easily done using some jQuery.