Results 1 to 7 of 7

Thread: header controled Frame

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2004
    Posts
    21

    header controled Frame

    Is it possible to create a dynamic type of page that will change the URL address when the frame content is changed, like index.php?main=updates.html
    this way I could include my framed menu without the lack of linking capabilities. Any ideas?

    To clarify the index page would be a dynamic page with frames. When you click a link instead of leaving the URL address alone, it changes to index.php?main=content/link.html

    This way you can have a framed menu and better linking capabilites.
    Last edited by J_Man; Jul 29th, 2004 at 10:27 PM.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You mean something like:
    Code:
    <frameset><frame src="nav.php">
    <frame src="<?php echo $_GET['main']; ?>"></frameset>
    Sure is possible. Just make sure nobody can insert their own pages into your frameset.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2004
    Posts
    21
    how do I set the default page if there is no value? I'm using cells now

    Code:
     <td nowrap><?php include $_GET['load']; ?></td>

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    I do this on my site. It also stops people injecting their own vlaues too:
    PHP Code:
    <?php
        $location 
    = (isset ($_GET['location'])?$_GET['location']:'main');

        switch (
    $location) {
            case 
    'random':
                
    $includefile 'random.php';
                break;
            case 
    'projects':
                
    $includefile 'projects.php';
                break;
            case 
    'main':
            default:
                
    $includefile 'main.php';    
        }
        
        @include (
    "include/$includefile");
    ?>
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jul 2004
    Posts
    21
    doesn't seem to work, I don't need to prevent injecting own values or any thing complex, just an include page and a default start page. How do I apply the code you gave?
    Last edited by J_Man; Aug 6th, 2004 at 02:15 PM.

  6. #6
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    umm... you put it in the page?

    Can you explain what it is that isn't working? Are you getting an error... is it loading the wrong page... ???
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jul 2004
    Posts
    21
    Code:
    <frameset><frame src="nav.php">
    <frame src="<?php echo $_GET['main']; ?>"></frameset>
    I need to do the exact same thing but in .asp now, other code is already .asp

Posting Permissions

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



Click Here to Expand Forum to Full Width