javascript navigation

This is a discussion on "javascript navigation" within the JavaScript Forum section. This forum, and the thread "javascript navigation are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jan 22nd, 2008, 21:01
New Member
Join Date: Jan 2008
Location: sfo
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
javascript navigation

I have inherited a simple template, which includes a .js to control the navigation and some of the page elements.

You can see the template in action here:
http://valentinabettencourt.com/LearningModule/

we update the .js with the navigation entries. this very nicely then writes in a pageName which will be displayed on the page as well as document title, links to previous and subsequent pages and so on. However, it only does so for pages entered as part of the main navigation.

The issue is that we also have a couple of pages which are not a part of the main navigation but which link off the footer. These pages, unfortunately, show up with the title, and so on from the index page. I would like to find a way for these pages to display their own correct title and pageName.

I am not wedded to the solution which I inherited, though you may be able to help me sort it out. Or, if you know of another nice simple way to do this, I would appreciate it.

Last edited by c010depunkk; Jan 23rd, 2008 at 06:29. Reason: fixed some BB code....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jan 23rd, 2008, 14:16
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Re: javascript navigation

this is terrible programming, but here's a work around:

1. open nav.js

2. change line 18 from...
return 0;
...to...
return -1;

3. change line 56...
var p = PAGES[THIS_PAGE_INDEX];
...to...
if(THIS_PAGE_INDEX<0) return;
var p = PAGES[THIS_PAGE_INDEX];

4. Now edit references.html and aboutus.html to put whatever text/title you want...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jan 23rd, 2008, 21:03
New Member
Join Date: Jan 2008
Location: sfo
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you so much, Diego!

That did the trick...

You're my hero.

Buttercup
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jan 24th, 2008, 10:22
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Re: javascript navigation

Another happy customer... Ahhh....
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript rollover navigation through css supbtsup JavaScript Forum 2 May 27th, 2008 02:56
Javascript navigation problems mikka23 JavaScript Forum 8 Sep 30th, 2007 12:22
Javascript Navigation Will Not Work With Firefox cpando1974 JavaScript Forum 2 Apr 1st, 2007 14:56
JavaScript Navigation II soda JavaScript Forum 3 Sep 29th, 2005 11:44
Javascript Navigation Smokie JavaScript Forum 10 Feb 24th, 2004 16:09


All times are GMT. The time now is 12:45.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42