Best Approach To Tabs Navigation?

P

pbd22

Hi.

I am building a bit of a "learn-as-you-go" web site.
I have tabs that change based on what page the
user is on. The problem is, I have been using a
javascript doOnLoad function to recognize the page
the user is on and, then, provide the correct tabs.
This depends on a normal URL, such as http://www.mysite.com/index.html.
But, as I build
the site, I am learning that there are times when all
sorts of junk is in the URL (cookieless session states,
query strings, etc).

So, what is the best way to design navigation tabs
that follow the user's location despite an unpredictable
URL? My onload method isn't cutting it. FYI, this is the
basic idea of what i have been relying on:

function doOnLoad() {

if(window.location.href) {
var hrefString = window.location.href;
try {
if (hrefString == 'http://localhost:8342/folder1/
signin/signin.aspx')
{
OpenTab(stuff...);
}
if (hrefString == 'http://localhost:8342/folder1/
home/home.aspx')
{
OpenTab(stuff...);
}

ETC...

Thanks in advance.
 
P

pbd22

Can you give us a URL of the pages you're working on, or an example of
somebody eles's tabs that are similar to what you're trying to do?

Hi John,

It seems the demo site has disappeared (www.havocstudios.com). I found
this one and there is a short demo of what the tabs look like about
1/3 the way down the page:

http://www.maxkiesler.com/index.php/designdemo/fullview/371/

This site describes the code and its various functions for the ajax
tabs UI:

http://www.maxkiesler.com/index.php/designdemo/fullview/371/

I dont have a live site at the moment but I hope that gives you and
idea of what I am trying to do. Be happy to answer questions or send
code.

Thanks for your help.
 
P

pbd22

Hi John,

It seems the demo site has disappeared (www.havocstudios.com). I found
this one and there is a short demo of what the tabs look like about
1/3 the way down the page:

http://www.maxkiesler.com/index.php/designdemo/fullview/371/

This site describes the code and its various functions for the ajax
tabs UI:

http://www.maxkiesler.com/index.php/designdemo/fullview/371/

I dont have a live site at the moment but I hope that gives you and
idea of what I am trying to do. Be happy to answer questions or send
code.

Thanks for your help.


Ooops... sorry about that. Meant "Jim".
 
P

pbd22

But why would you -- or anyone else -- turn off CSS?


Jim -

I take it my links didn't provide useful info
for explaining what I am trying to do? Happy
to provide more code/info per request.
Anybody have some advice as to how to provide
tabs-based navigation on sites where the URL
gets parsed/changed a lot. In those cases, I
cannot use window.location.href to figure out
which tabs should be displayed.

Thanks in advance (again).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top