Results 1 to 4 of 4

Thread: what is the best way?

  1. #1
    Join Date
    Apr 2008
    Manchester, UK

    what is the best way?

    Hi All,

    I have a website I have created with a navigation bar at the top. At the moment when I click on the nav bar it takes me to the new page I have selected.

    What I am trying to do is to display the contents of the new page in the middle of the homepage so just the middle part of the page updates to what I have selected in the nav bar.. I want the rest of the page to stay as it is.

    What is the best way to do this?
    I am using Dreamweaver mainly as well as a text editor to write code.
    I thought maybe css or javascript.



  2. #2
    Join Date
    Jul 2011
    Use iframe, php include or php file get contents

  3. #3
    Join Date
    Jul 2011
    If you don't mind using JavaScript, and more specifically the JQuery library, you can simply create multiple content areas in the same homepage. What you can do is set all the areas to display none in css but give one an 'active' class which will be the content area on display. With JQuery you can simply set up a function for when the user clicks a link, the corresponding content area will be given the active class and will be displayed using the show() function in JQuery.

  4. #4
    Join Date
    Dec 2008
    What you're trying to do is a very outdated method of navigation called "frames". You would accomplish this by wrapping your content section in an iframe, giving it a name and applying the "target" attribute to your links to use the name of your iframe.

    The more preferred method is to use a template. If you don't have content rendering scripts created in your server side language, then simply copy and paste the code from one page to the next, only changing the part that needs to be changed. The browser caches images, so it won't reload them every time.

Thread Information

Users Browsing this Thread

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

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