So within a website is a div that contains another part of the website being loaded when a tab is clicked.
So let's say clicking a tab loads up a file called "hive/index.php". When someone clicks on an option in an autoplete, I only want to reload hive/index.php and still have the rest of the page, not the entire webpage. How do I do that?
So within a website is a div that contains another part of the website being loaded when a tab is clicked.
So let's say clicking a tab loads up a file called "hive/index.php". When someone clicks on an option in an autoplete, I only want to reload hive/index.php and still have the rest of the page, not the entire webpage. How do I do that?
Share Improve this question asked Oct 27, 2014 at 16:04 OrpheusOrpheus 7771 gold badge8 silver badges23 bronze badges 3- Something like load() or ajax() – Smern Commented Oct 27, 2014 at 16:05
- well, load just refreshes the whole page, when I still need to stay on a certain tab. All I'm aiming for is to have THAT php reloaded, and not the entire page. – Orpheus Commented Oct 27, 2014 at 16:09
-
No,
load()
will load data into a specified element. That element could be the container for this "certain tab" and the data could be from "THAT php". – Smern Commented Oct 27, 2014 at 16:10
1 Answer
Reset to default 3If using jQuery,
<script src="//ajax.googleapis./ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
$('#divID').load('hive/index.php'); //<- Use this on any event in which you want to refresh the content
</script>