www.webdeveloper.com
Results 1 to 4 of 4

Thread: Problems with navigation and divs

  1. #1
    Join Date
    Jan 2009
    Location
    Finland
    Posts
    5

    Question Problems with navigation and divs

    Please help me! I've tried to make this work for about 2 days now, and still no success.. So I'm not that good with javascript. So my problem is, that I have a page where I have different divs, such as menu, leftcol, rightcol and content. My menu is a dropdown menu made with css.

    I want it to work so, that when I click something in my menu, for example the contact info-button, i want the content to change only in the content div. At the moment it loads the whole page, as I have them all in different pages, which actually sucks, cause if I change something in the navigation, I have to change it to way too many pages. It's probably simple, but no can do. So how can I do that? Help..

    Btw, I hope you understood my problem. My explanation wasn't probably the best one.

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    The navigation problem is solved using includes: http://www.webdeveloper.com/forum/sh...76&postcount=2
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #3
    Join Date
    Jan 2009
    Location
    Finland
    Posts
    5

    Question

    Thank you for help. It works, but the text appears after the wrapper div. The structure of my page is as follows:

    I have a wrapper div, inside that there are the header div, menu div with my dropdown menu, then leftcol, content and rightcol. I want the header, menu and leftcol stay the same on every page. Rightcol is only on the index page, and then content is what changes according to the links. Now if I do as it says on that php tutorial and leave the code for menu, header and leftcol to the menu.php file and then put the content and rightcol divs inside the index.php with the php include command, it throws the text under the wrapper div. How can I get it inside the content div? Do I need to add something else to the files?
    Last edited by InTrouble; 01-17-2009 at 04:21 AM.

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Your site should function correctly without JavaScript. The includes will allow you to edit the menu and have those changes displayed in all pages.
    To get just the content to change using Ajax.
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles