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.
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.