Need some help with a dock menu

Discussion in 'JavaScript' started by dmanto2two, Feb 15, 2010.

  1. #1
    i have a dock menu on the site i'm working with. I'm more of a php programer than javascript and ui coding is new to me. I have the dock and the main body of the site broken into different divs with the php in the body div and the dock in the dock div. Does anyone know of a way i could load the new pages into the body div, or even the info of those pages into the body div? It would aid the ui if i didn't have to dock reset itself every time the page loads, and besides it would save on redundant page loads. Anyone have any ideas? Would i be using ajax in some form? thanks for any help.
     
    dmanto2two, Feb 15, 2010 IP
  2. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    You could do this with either ajax or using an iframe, but it would be no good for SEO. The search engines would not see the content of the body div or index any seperate pages.
     
    camjohnson95, Feb 16, 2010 IP
  3. dmanto2two

    dmanto2two Peon

    Messages:
    56
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    So i would ajax? Would i break each page into divs and load each one when needed? All of the info on the site is individual to each user(don't know if that affects it). here is an abriviated version of the code .
    <?php
    lots of php
    ?>
    <html>
    <head>
    <script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>
    <script type="text/javascript" src="js/jquery.easing.1.3.js"></script>

    <script>
    dock java
    </script>
    <style>
    lots of css
    </style>
    <body bgcolor=black>
    <div id="fake-body">

    <div class="container">
    <div class="top">

    </div>
    <div class="left">

    <div class="friend">
    <?php

    ?>
    </div>
    </div>
    <div class="right">
    <p>hmm. i swear to christ i'm going
    to kill whoever invented ccs.</p>
    </div>
    <div class="content">

    <center>
    <?php

    </center>
    </div>
    <div class="foot">
    <p>cough</p>
    </div>
    </div>
    </div>
    <div id="dock">
    <div id="top">
    </div>
    <div id="space">
    </div>
    <div id="bottom">
    <?php
    display_user_menu();
    ?>


    </div>
    </div>
    </body>
    </head>
    </html>
    thanks for responding camjohn
    I read an article recently on jquery and ajax tabs. would a maybe use a method like that to reload all of the info except my dock? just throwing ideas out.
    again thanks for any help
     
    dmanto2two, Feb 17, 2010 IP
  4. dmanto2two

    dmanto2two Peon

    Messages:
    56
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Well i figured it out. you can do all of this with jquery load(). just in case anybody else needs it. Thanks to all for all of your help
     
    dmanto2two, Feb 21, 2010 IP