Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Klaubinho

macrumors newbie
Original poster
Aug 5, 2009
2
0
hi everybody!

Please excuse my bad wording, but i dont really know with wich words i can explain what i want to do.... And i am a newbie in CSS // div-tags

The Website i am currently working at has now a definite layout:
-Header
-Sidebar
-Main-content
-Footer

So i used div-Tags to set up the layout. Now i arrived the great question:
How to navigate the main-content with the sidebar?
I want to show anoter content in the main-content if i push a button on the side-bar.

Could you pls help me guys or send me a link where this subject is covered?

Many many Thanks!!!
 
You don't want to just create a link and have an identical page, sane the main content, load?

the easiest thing I can think of would be to use some javascript. It's been a while since I used it, let me look...

Ok, so the code that I had from http://www.dyn-web.com is no longer there, so I've zipped up the template I have, and I'll post it.

you could also use AJAX (I'm partial to mootools) but that's more advanced then it sounds like you need.
 

Attachments

  • page.zip
    3.7 KB · Views: 85
Generally, you just use another page that has the same layout. That way it's more manageable. Also, this will generally need to be done with JavaScript, and some visitors have JavaScript disabled so they won't be able to see that other content. How best to do what you need partly depends on the amount of content that needs to be changed and the nature of the content.
 
ohoh!

java? i have never worked with java!
no experience! If there is just a java-solution then i need very much understanding from your part for my ignorance ;-)

thx
 
You really don't need JavaScript for that. Either, you create all files purely in HTML and just link them from your sidebar, or you use the most basic PHP to include the main content in the template (which consists of the header, sidebar and footer).
 
java? i have never worked with java!
no experience! If there is just a java-solution then i need very much understanding from your part for my ignorance ;-)

thx

Just to let you know, there's a big difference between Java and JavaScript. You won't find any relevant answers to this problem by searching on Java. Make sure to use the word JavaScript on searches.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.