only one changing part of website

Discussion in 'Web Design and Development' started by Klaubinho, Aug 5, 2009.

  1. Klaubinho macrumors newbie

    Klaubinho

    Joined:
    Aug 5, 2009
    #1
    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!!!
     
  2. thejadedmonkey macrumors 604

    thejadedmonkey

    Joined:
    May 28, 2005
    Location:
    Pa
    #2
    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.
     

    Attached Files:

  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3
    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.
     
  4. Klaubinho thread starter macrumors newbie

    Klaubinho

    Joined:
    Aug 5, 2009
    #4
    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
     
  5. ergdegdeg Moderator emeritus

    ergdegdeg

    Joined:
    Oct 13, 2007
    #5
    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).
     
  6. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #6
    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.
     

Share This Page