Dynamic menu, is it possible with only js and dom?

This is a discussion on "Dynamic menu, is it possible with only js and dom?" within the JavaScript Forum section. This forum, and the thread "Dynamic menu, is it possible with only js and dom? are both part of the Program Your Website category.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 21st, 2008, 03:37
New Member
Join Date: Feb 2008
Location: United States
Age: 18
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Dynamic menu, is it possible with only js and dom?

Hi I am a student in high school and am kind of teaching myself for a grade, and have decided to learn some javascript. As such I have no formal training in its myriad uses, but I think this is posible.

Here is the proposition: I have an iframe in the center of the index page, I use this iframe to view the rest of the site. I would like to change certain of the menu items based on the current page viewed in the iframe.

So it breaks down into: iframe src="page1" in the html and I have my menu links. I would like it if the links would switch based on the contents of the iframe. So that if you click the link to page2, that link is switched with one back to page1.

Any help is greatly appreciated.
Reply With Quote

  #2 (permalink)  
Old Mar 21st, 2008, 13:21
CloudedVision's Avatar
Nerdy Moderator
Join Date: Feb 2008
Location: In My Own Little World
Age: 14
Posts: 942
Blog Entries: 8
Thanks: 2
Thanked 22 Times in 22 Posts
Send a message via AIM to CloudedVision Send a message via MSN to CloudedVision Send a message via Skype™ to CloudedVision
Re: Dynamic menu, is it possible with only js and dom?

i would stay away from iframes. is it necessary to use one?
__________________
echo "Take it easy, ".$CloudedVision;
.links { site: other-road-design; blog: only-nerds-allowed; project: resource-fish; organization: ARMIES6; }
<quote>&quot;I think it's wrong that only one company makes the game Monopoly&quot; - <name>Steven Wright</name></quote>
Last Blog Entry: More Cheat Sheets (Jul 12th, 2008)
Reply With Quote
  #3 (permalink)  
Old Mar 21st, 2008, 17:11
New Member
Join Date: Feb 2008
Location: United States
Age: 18
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dynamic menu, is it possible with only js and dom?

No, not really just expanding my proverbial horizons.
Reply With Quote
  #4 (permalink)  
Old Mar 21st, 2008, 17:37
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,011
Blog Entries: 2
Thanks: 5
Thanked 23 Times in 20 Posts
Send a message via Skype™ to Aso
Re: Dynamic menu, is it possible with only js and dom?

Stick to HTML, CSS, Javascript and the DOM.

You could design all the pages of your site, using HTML and CSS, and then pull in each page using AJAX, so the browser doesn't have to reload. But if the user has Javascript disabled, they can navigate each page seperately.

Another alternative is to have div blocks with each section's content, all in one HTML page. Then use Javascript to hide the blocks when the DOM is ready, and display each one when it is called with a link. Again, if Javascript is disabled, the user can just browse the entire page, scrolling down for each section.
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #5 (permalink)  
Old Mar 26th, 2008, 17:26
New Member
Join Date: Feb 2008
Location: United States
Age: 18
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dynamic menu, is it possible with only js and dom?

aso186,

With the divs, would you hide them with visibility or a high negative left?

As far as AJAX is there a tutorial or book that you would recomend for begginers? Most of the things that I have found on the subject seem to assume apriori knowlege, or would go well with a web development class.
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
Dynamic Layout Dgrade Flash & Multimedia Forum 3 Mar 17th, 2008 03:03
Dynamic Select Menu with Onchange pimpmaster JavaScript Forum 2 Jun 18th, 2007 18:11
I have a normal css menu, but want ot add drop down menu to it multichild Web Page Design 7 Jan 9th, 2007 16:07
Dynamic Menu (Please Help me) bijeeshmk Flash & Multimedia Forum 5 Jan 6th, 2007 10:38
Dynamic Database oriented menu arora.a ASP.NET Forum 3 Feb 27th, 2006 13:16


All times are GMT. The time now is 09:25.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs 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 43