I am trying to refresh Ajax content into a jQuery UI tab. i've seen lots of folks ask, and lots of solutions suggested (albeit all of them incomplete or non working) so once more... how is this done?
Here is what i've got:
<script>
$(function() {
$( "#tabs" ).tabs({
ajaxOptions: {
error: function( xhr, status, index, anchor ) {
$( anchor.hash ).html(
"Couldn't load this tab. We'll try to fix this as soon as possible. " +
"If this wouldn't be a demo." );
}
}
});
});
</script>
<div class="demo">
<div id="tabs">
<ul>
<li><a href="/vendor/tab_vendorInfo.cfm" title="vendor">Vendor Info</a></li>
<li><a href="/vendor/tab_vendorDelivery.cfm" title="delivery">Delivery</a></li>
<li><a href="/vendor/tab_vendorProducts.cfm" title="products">Products</a></li>
<li><a href="/vendor/tab_vendorRequests.cfm" title="requests">Requests</a></li>
</ul>
<div id="tabs-1">
</div>
</div>
</div><!-- End demo -->
****
and in one of the panels, I'd like to be able to reload the panel, passing additional parameters in the query string
such as:
<!--- panel 4 --->
Here is some content that would show initially.
If you click this <a href="panel4.cfm?catID=1">category</a> it will reload the href INTO the current tab
<!--- end panel 4 ---->
....
I would even be open to getting a JSON response to the ajax call, but simply reloading the tab is a nightmare enough.
I'd kill for some decent jQuery docs. The examples provided really aren't complete enough to do anything except encourage blind copying and pasting.
I've seen reference to the .load function, but no example of how or where it is used. I've seen reference to "binding to the click event", but again, it's in a situation without ajax.
How is this EXTREMELY SIMPLE task done with ajax? I mean really? no equivalent to 'target' like good ol frames?
that sucks moose toes.