/    Sign up×
Community /Pin to ProfileBookmark

change navbar based on url

I am currently putting up a store site using shopping cart software. I can write my own nav bar, but it can only be input once for the entire site. in other words, i can’t change the code from page to page. therefore, i want it to change dynamically as users move from page to page–i.e., when they select phones, i want the phones submenus to display and the down-image of the navbar to show. i was thinking that a javascript if/then loop that displays a version of the navbar when the url meets some condition might work. if the term “CATEGORY=5” exists in the address, then display the submenu for phones. however, i have no idea how to do this. does anyone know of a canned version i could tweak or something?

thanks,
DR

to post a comment
Java

2 Comments(s)

Copy linkTweet thisAlerts:
@ray326Sep 16.2004 — You need to ask this in the Javascript section.
Copy linkTweet thisAlerts:
@DiscoRhinoauthorSep 16.2004 — sorry, will do.

DR
×

Success!

Help @DiscoRhino spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...