www.webdeveloper.com
Results 1 to 6 of 6

Thread: Html - php hrlp please?

  1. #1
    Join Date
    Oct 2009
    Posts
    3

    Talking Html - php hrlp please?

    Hi, Im new to php and such things like that basically i am still learning css and xhtml but i am trying to make a website that loads my content in my div (for example a ifream loads just in the ifream when you click a link) i want to try and get an affect like that such as when i click home it will just load in <div id=my-div> content </div> part of my site and not reload anything else, here is some of the code that i am using.
    HTML Code:
           <div id="nav">
            	<ul id="main_nav">
            	<li class="home"><a href="#">Home</a></li>
                	<li class="about"><a href="#">About</a></li>
               	<li class="contact"><a href="#">Contact</a></li>
                	<li class="portfolio"><a href="#">Portfolio</a></li>
                	<li class="latest-work"><a href="#">Latest Work</a></li>
               	<li class="login"><a href="#">Login</a></li>
                	<li class="services"><a href="#">Services</a></li>
            	</ul>
            </div>
    I would like it to be when you click a link it loads the content just in my div (which the code for my div is bellow."panel_middle_inner")

    THANKS IF YOU CAN HELP =D

    HTML Code:
    <div id="colum1">
            	<div id="panel_tab"></div>
                <div id="panel_middle">
    		<div id="panel_middle_inner">
                    <p> TESTER:  TESTER:  TESTER:  TESTER:  TESTER:  </p>
                    </div>
                </div>
            </div>

  2. #2
    Join Date
    Jan 2009
    Posts
    3,346
    You'll need to use AJAX to load only a part of the page onclick. PHP requires a full reload to change the page when not used in conjunction with AJAX.

  3. #3
    Join Date
    Oct 2009
    Posts
    3

    :o

    aw i see :O , eh could anyone please show me how i would do this maybe ? or point me to a tutorial or something , thanks

  4. #4
    Join Date
    Jan 2009
    Posts
    3,346

  5. #5
    Join Date
    Oct 2009
    Posts
    3
    thanks
    i worked out how to do it and works fine
    have a quesgin but, when yo navigate trough the site using ajax to load the content in the div you cant go back :O if you try to return to the last content it goes bak befoar you went on the website, is there a way to fix this? or acode you could put in a button on your loaded content that would make it so you can go bak to last content u were on? thanks.

  6. #6
    Join Date
    Jan 2009
    Posts
    3,346

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles