Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Feb 2007
    Posts
    3
    Member #
    14852
    Hey I'm relatively new to the world of web design and have just recently had a go at using PHP to do a client's website. I chose to use PHP because I read on another forum that if I used the <? include("header.html"); ?> and <? include("footer.html"); ?> fuctions, the flash navigation at the top of the pages would not have to reload. (It's in the header and the (C) 2007 JFive Technology is in the footer.)
    Why does it have to reload the navigation everytime a different page is visited? How can I change this?
    -thatsinsane

  2.  

  3. #2
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    That other forum must have gotten the words mixed up.... no, doing includes does not mean only a single load is required. May I explain.

    Using a PHP include, what you're doing is telling your server that it should punch in a piece of HTML code into where that include just was. Then it is sent to your visitors, which receive the whole file intact. Thus for them, every load is a new file.

    There is no practical way to save parts of the page from refreshing, except using frames (or iframes). And those bring up a whole new problem...
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  4. #3
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Yes, the advantage of the include is that it lets *you* specify changes in one place and see them reflected on all pages. This is a very good thing, maintenance-wise, when you have information displayed on multiple pages.

  5. #4
    Junior Member
    Join Date
    Feb 2007
    Posts
    3
    Member #
    14852
    Okay well now that I have identified my problem, how should I redisgn the site so that the flash naviagtion doesn't load each time? I am familiar with frames though I hate them. .. what are iframes and how do i use them? I link to a tutorial would be appreciated . Thanks for the help,

    thatsinsane

  6. #5
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    Well, there is no practical way to prevent things from reloading every time a visitor moves from page to page. Iframes are simply small frames that can be placed anywhere (not on the sides like usual frames), so usually you will want to put your content section inside an iframe in the center.

    However, there are numerous difficulties - search engines will link to the content page and therefor no menu/header (or search engines may not be able to properly index you at all), bookmarks may be troublesome, and people can't see the actual name of the inner page from the address bar. And one more - people can't open multiple pages at once.

    Too many problems, I think. I'd just have them reload. Your banner and footer shouldn't be above 15kb, wich most people can download in very fast.
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  7. #6
    Junior Member
    Join Date
    Feb 2007
    Posts
    3
    Member #
    14852
    Okay I understand.. . is there anyway I can get the animation at the start of my navigation to only play once and then it remain the navigation the rest of the time? Like say I had a seperate flash intro and when it was done playing it would simply go on to another flash movie which is the straight navigation?

    Here is the website: http://www.gobravo.ca/

    -thatsinsane

  8. #7
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    In your case frames would work. And you can probably set cookies so that only the first visit should run the intro.

    But I strongly urge you to reconsider using flash navigation, unless you don't want a lot of people/search engines to be blocked out of your site. People without the flash plugin, those who dislike flash, those who disable flash (usually to cut down on filesize), those who use screen-readers, those who use text browsers, those who want to open pages in new windows/tabs, and search engine crawlers are unable to navigate your site!

    Please consider using a simple, CSS-based navigation instead.

    Important edit: your HTML is seriously defunct. There seem to be 3 DOCTYPE declarations, <html> tags embedded in each other, 3 sets of head-body tags... it looks like 3 pages in one! Then tables and styles in the head... it's a wonder Firefox renders your page properly. Of course it could just be my view-source function that's not right, but it looks like you have some serious problems. The W3C validator says 12 errors, but I'm sure there are a lot more... Please, please reconstruct your HTML first.
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:23 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com