Find the answer to your Linux question:
Results 1 to 4 of 4
I need a html simple codes.(i tried to write myself , but not get it correctly) The page has three parts . 1 part will have site logo. 2 part ...
  1. #1
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Talking HELP on HTML

    I need a html simple codes.(i tried to write myself , but not get it correctly)

    The page has three parts .

    1 part will have site logo.
    2 part will have links
    3 part will display the contents when u lick on the links from part 2.

    i'm trying this with iframes and frameset - is that correct
    way to follow?

    Any help on coding part?
    ------------------------------------------------
    Part -1 || part 2
    ||
    LOGO || Links -1 Link-2
    --------------------------------------------------


    Display content based on link clicked from part-2



    -------------------------------------------------
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    If you have problems with HTML try using Firebug / Bluefish to make it
    New Users, please read this..
    Google first, then ask..

  3. #3
    Just Joined!
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    13
    Try this for size...it's PHP, and very simple to follow
    Remember to save your file as filename.php instead of filename.htm

    ===
    PHP Code:
    <?php

    $topLink
    [0] ="Main Links";
    $topLink[1] ="Second links";
    $topLink[2] ="Third Links";

    $subLink[0][0] = "Main Link 1";
    $subLink[0][1] = "Main Link 2";
    $subLink[1][0] = "Second Link 1";
    $subLink[1][1] = "Second Link 2";
    $subLink[2][0] = "Third Link 1";
    $subLink[2][1] = "Third Link 2";

    $urlLink[0][0] = "http://googlemail.com";
    $urlLink[0][1] = "http://hotmail.com";
    $urlLink[1][0] = "http://safernetworks.com/whcookie/";
    $urlLink[1][1] = "http://www.linuxforums.org/forum/linux-programming-scripting/129423-php-anti-linkbucks-your-site.html";
    $urlLink[2][0] = $_SERVER['PHP_SELF']; //refer back to self...
    $urlLink[2][1] = "http://yahoo.com";

    echo 
    "<div align=left>";
    //build the top menu
    for ($i=0;$i<count($topLink);$i==){
        echo 
    "[<a href='dummy.php?P=".$i."'>".$topLink[$i]."</a>]";
    }
    echo 
    "</div>\n<div>";
    echo 
    "<img src='img/logo.jpg' width=180 height=60 border=0>";
    $CurP 0+$_REQUEST['P']; //doesnt matter if POST or GET, get what menu item the user selected
    //create second set of links...
    for ($i=0;$i<count($subLink[$curP]);$i==){
        echo 
    "[<a href='".$urlLink[$curP][$i]."'>".$subLink[$curP][$i]."</a>]";
    }
    echo 
    "</div>\n";

    /*
    IMPORTANT!

    on some systems the $CurP wont be set if you only assign
    $CurP = $_REQUEST['P'] or it comes in as value = ''
    Instead we force it to 0 + value and it leaves it as 0 if nothing was passed.
    This way you dont have to check
    if (($_REQUEST['P']!='') OR ($_REQUEST['P']==0))
    but only the actual integer value

    */


    ?>

  4. #4
    Just Joined!
    Join Date
    Jul 2007
    Posts
    9
    there are two methods. you can use frames or something like that - which are obviously disgusting. or you can refresh the entire screen and use GET values or something like that to retrieve pages dynamically. In fact, what you really want to do is make your entire site except the contents of "part 3" just a template, and then dynamically fetch the part 3 contents using a database or files (be really really careful about your security though)

Posting Permissions

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