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.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
  1. #1
    Senior Member
    Join Date
    Sep 2003
    Location
    Sydney
    Posts
    114
    Member #
    3051
    Hi there,

    I'm working on a site here and looking to redesign it.

    At the moment it works in that the nav bar is in one frame and the main section is in another. They designed it this way because in the main section there is a form for booking a trip through a third party and they want the nav bar to stay on top when that external page is called in.

    What I would like to know is...is there a way to eliminate using these frames by using some sort of php include/require/whatever that will keep the Navbar visible the whole time?

    Thanks in advance.

  2.  

  3. #2
    Senior Member straight_up's Avatar
    Join Date
    Dec 2003
    Location
    Pennsylvania/Arizona
    Posts
    601
    Member #
    4309
    Yes, you want to read up on "Server-side includes" (SSI).

    You may also want to look up the include() and require() functions on www.php.net


    To make the nav "always visible" even when scrolling, you can
    (1) give it CSS "position: fixed" which will not work in IE6
    or
    (2) use a big table an put the main content in a cell that has CSS "overflow: scroll"
    I am Alan Hogan (@alanhogan on Twitter). I like PHP, UI/UX design, and OS X.

  4. #3
    Senior Member straight_up's Avatar
    Join Date
    Dec 2003
    Location
    Pennsylvania/Arizona
    Posts
    601
    Member #
    4309
    In reality tho, users know how to scroll back up to the nav.
    I am Alan Hogan (@alanhogan on Twitter). I like PHP, UI/UX design, and OS X.

  5. #4
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    Having fixed navigation sometimes doesn't help much. People know they need to go to the navigation to go places and it can sometimes be confusing why it's following them around.
    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.

  6. #5
    Senior Member
    Join Date
    Sep 2003
    Location
    Sydney
    Posts
    114
    Member #
    3051
    It's not so much that the nav stays when a user scrolls...it's that when this external form is called it stays.

    I'm beginning to think it's not possible after a few different tries.

    include() and require() definitely don't work...at least not in the ways I know they do it.

  7. #6
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    right as said before if your content scrolls past the menu people know to scroll back to the top to start with. And secondly how can you get php includes wrong its so simple..just use
    PHP Code:
    <?php
    include ('somedir/somefile.ext');
    ?>
    Regards Phil,


  8. #7
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    I would suggest the rest of you actually read what the post says ;-)

    As far as I know, silver10, the only good way of going through an external site while maintaining control is through frames. And even then `maintaining control' is a bit of an overstatement.

  9. #8
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    There's no such thing as "control" if you're referring to another site by frames on the web. Things change and evolve...
    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.

  10. #9
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    What about using the fopen function in PHP would that work for what you want?
    Regards Phil,


  11. #10
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    leprechaun13, how could "fopen" possibly offer a solution to his problem??
    That's just the glue between a stream and a wrapper. If no wrapper is defined/found, you'll just generate an error message.
    fread() would stream the resource, but you would still need a container to handle the output.

    Quote Originally Posted by shadowfiend
    ...the only good way of going through an external site while maintaining control is through frames.
    As Shadowfiend says, the only way to maintain your layout when redirecting to an external site, is to use frames (unless you want to load the external site in a pop up window, but I guess that's not what you're aiming for).

    If you want to launch an external site within your space, you'll have to designate a piece of screen property, that is cut loose from the rest of the page (Like an independant layer on top of your design).
    Only frames can do that at present.

    However, frames are not frames in every respect. The traditional frames (which I assume you're strugglig with) are cumbersome and verbose (and hard to maintain).

    The easiest "modern" frame, is the "iframe". It works like a <div>. You can assign attributes to it, and position it anywhere you like.

    You can have a look at this thread that includes an example at the very end.
    S. Rosland


Page 1 of 2 1 2 LastLast

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 03:03 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com