Another Noob question relating to hyperlinks, tabs and ajax.
Hi there, I'm new to the forums and i'm hoping someone might be able to assist me. I only found out that Jquery existed 2 days ago so please bear with me. This question has probably been answered before but I'm possibly searching for incorrect terminology...for this, I apologise.
I have a multitude of issues but 2 main ones that are bugging me more than others.
I have an index page using tabs. Works quite well. In my list of tabs, one of them points to a container within index.php and the rest are ajax calls to /whatever/index.php, etc.
My first issue is that when I click the tab that represents the index page itself (i.e. the container) having previously clicked one of the ajax tabs, it just doesn't do anything (it's not clickable). I don't have any fancy javascript:
-
<script type="text/javascript">
$(function(){
// Tabs
$('#navtabs').tabs();
});
</script>
-------------------------------------------------
<!--Tabs starts here-->
<div id="navtabs">
<ul>
<li><a href="#main"><span>Home</span></a></li>
<li><a href="/blah/index.php" title="main"><span>blah</span></a></li>
<li><a href="/blah1/index.php" title="main"><span>Web Mail</span></a></li>
<li><a href="/blah2/index.php" title="main"><span>Mail Stats</span></a></li>
<li><a href="/blah3/index.php" title="main"><span>Loads Page</span></a></li>
<li><a href="/blah4/index.php" title="main"><span>Software Page</span></a></li>
<li><a href="/contact/contact.php" title="main"><span>Contact Page</span></a></li>
<li><a href="/thanks/index.php" title="main"><span>Thanks</span></a></li>
</ul>
<!--main starts here-->
<div id="main">
<h1>Stuff</h1>
more stuff
<!--main ends here-->
</div>
The second problem is as follows:
If I click a link from the main page that takes me to (for example) /blah1/index.php it appears in the correct div on the main page...ace! However, if *that* page contains some hyperlinks that subsequently point to /blah1/someotherdir/index.php all the formatting is lost when the link is opened. How can I keep all child links within the correct div on the original index page?
Thanks in advance for any help, it's much appreciated.
Paul