+ Reply to Thread
Results 1 to 7 of 7

Thread: Needing help with PHP includes

  1. #1
    poringy's Avatar
    poringy is offline x10Hosting Member poringy is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    Houston
    Posts
    95

    Needing help with PHP includes

    Well, here is my problem. Everytime I click on my navigation links, the whole page has to refresh. I don't want that, I want only the CSS div of the include() to refresh. How do I do this?

    (In other words, I'd like for the include to work like an iframe. Only the iframe is updated and not the page that holds it.)
    Last edited by poringy; 09-07-2006 at 07:40 PM.
    Bad breath makes the world go half round.

    My website is being reconstructed to something useful, so no links yet!

  2. #2
    Cynical's Avatar
    Cynical is offline Lord Of The Keys Cynical is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Massachusetts, USA
    Posts
    1,746

    Re: Needing help with PHP includes

    You'll have to use a scripting language like JavaScript, PHP only can do things before the page is rendered. I'm very limited with JavaScript, so I Googled for something that might help you: http://www.thescripts.com/forum/thread90879.html
    Seven: This rule is so underrated, keep your family and business completely separated.

  3. #3
    poringy's Avatar
    poringy is offline x10Hosting Member poringy is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    Houston
    Posts
    95

    Re: Needing help with PHP includes

    I don't really like using any javascript since it really causes page problems when it is blocked. Are there any other alternatives? (probably not)

    Edit: Wait, there are quite a few of them...
    Last edited by poringy; 09-08-2006 at 01:26 AM.
    Bad breath makes the world go half round.

    My website is being reconstructed to something useful, so no links yet!

  4. #4
    nightscream is offline x10 Lieutenant nightscream is an unknown quantity at this point
    Join Date
    Feb 2006
    Location
    Hallaar, Belgium
    Posts
    474

    Re: Needing help with PHP includes

    put in your include <meta http-equiv="refresh" content="600">
    content="600"
    This is the amount of time, in seconds, until the browser should reload the current page.

    Atleast i think this do the trick, it refreshes your page or isn't that what you want
    Last edited by nightscream; 09-08-2006 at 11:15 AM.
    ------------------------------------------------------------------------------------------
    If you have any troubles with a website or a script, just send me a pm.

    I also code websites in xHTML/css, can code javascript and php too if needed

  5. #5
    Jake's Avatar
    Jake is offline Developer Jake is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    Winona, MN
    Posts
    2,084

    Re: Needing help with PHP includes

    i belive you want new content to show up were the old content was once you click a link in your nav right? and then when you do it doesnt refresh anything but the new content?

    if so you would need to use AJAX which is a combination of JavaScript and PHP.
    Jake Omann | Developer
    █ 888-X10-9668 - jake[@]x10hosting.com
    x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

  6. #6
    Cubeform is offline x10 Lieutenant Cubeform is an unknown quantity at this point
    Join Date
    Aug 2006
    Location
    127.0.0.1
    Posts
    339

    Re: Needing help with PHP includes

    AJAX.

    Asynchronous Javascript And XML.

    Load stuff dynamically with JavaScript. Works with other stuff (not just XML). Used by Gmail and Windows Live.

    Or...

    Why don't you just put an IFRAME in your div?
    Last edited by Cubeform; 09-08-2006 at 06:06 PM.

  7. #7
    jaint is offline x10 Sophmore jaint is an unknown quantity at this point
    Join Date
    Jul 2006
    Posts
    174

    Re: Needing help with PHP includes

    Quote Originally Posted by Cubeform
    AJAX.

    Asynchronous Javascript And XML.

    Load stuff dynamically with JavaScript. Works with other stuff (not just XML). Used by Gmail and Windows Live.

    Or...

    Why don't you just put an IFRAME in your div?
    What I think he wants is to be able to load a css file and change the style of the page without refreshing content. AJAX won't do that, ajax only imports content - it can't change the style of a page once it is already rendered (eg css can't be applied to components that are already rendered).

    You have to refresh the page to change the css style, otherwise certain elements of the page that were loaded initially won't get styled properly.

    Post Message

    ----------------------------------------------------------------------------------------


+ Reply to Thread

Similar Threads

  1. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  2. tons of PHP Resources
    By Chris S in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 01-16-2009, 10:07 AM
  3. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  4. PHP: Includes Tutorial
    By pulse__xx in forum Tutorials
    Replies: 14
    Last Post: 07-27-2006, 11:15 AM
  5. PHP Includes???
    By BriBri in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 06-22-2005, 12:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers