PDA

View Full Version : only one changing part of website




Klaubinho
Aug 5, 2009, 08:50 AM
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!!!



thejadedmonkey
Aug 5, 2009, 09:25 AM
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.

angelwatt
Aug 5, 2009, 09:37 AM
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.

Klaubinho
Aug 5, 2009, 09:39 AM
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

ergdegdeg
Aug 5, 2009, 09:42 AM
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).

angelwatt
Aug 5, 2009, 10:14 AM
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.