Another Noob question relating to tabs, hyperlinks and ajax

Another Noob question relating to tabs, hyperlinks and ajax


Hi there, I'm new to the group 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 know
why it's happening, I just don't know how to fix it. 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>
I've tried copying the "main" part of the css to "somethingelse" and
then calling #somethingelse but the symptoms are the same.
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? I could handle the css by putting a
reference to it in the top of the page (although i'm sure there's a
better way) but that still doesn't help me to keep it within
title=main as detaileed above.
Thanks in advance for any help, it's much appreciated.
Paul





























































    • Topic Participants

    • paul