I'm using jQuery-UI tabs - five in total. Tab 1 has a form for entry which submits into MySQL (via AJAX). Tab 2 pulls data from MySQL, based on what was entered via Tab 1. When I click from Tab 1 to Tab 2, I want the 2nd tab to refresh. I cannot use an external files as advertised on the jQuery-UI API due to some conflicts with other code. I'm using the following:
Here's my JS:
$(function() {
$("#tabs3").tabs();
$("#tabs3").on('click','li',function(event,ui) {
$("#tabs3").tabs("load", "active");
});
});
Here's my HTML:
<div id="tabs3">
<ul class="no-print">
<li><a href="#tabs-1">Enter Report</a></li>
<li><a href="#tabs-2">My Reports</a></li>
</ul>
<div id="tabs-1">
<form name="form" id="form" method="post" action="scripts.php" novalidate>
// form inputs
</form>
</div>
<div id="tabs-2">
<h4>My Reports</h4>
<?php
// PHP scripts that spits out the output
</div>
What can I do to make it so when I click from one tab to the next, it refreshes the content? I'm not opposed to each tab refreshing, but I would like to choose which ones get refreshed and which ones don't if that's not difficult.