Needing help with PHP includes

poringy

New Member
Messages
95
Reaction score
0
Points
0
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:

poringy

New Member
Messages
95
Reaction score
0
Points
0
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:

nightscream

New Member
Messages
948
Reaction score
0
Points
0
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:

Jake

Developer
Contributors
Messages
4,057
Reaction score
5
Points
0
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.
 

Cubeform

New Member
Messages
339
Reaction score
0
Points
0
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:

jaint

Member
Messages
174
Reaction score
0
Points
16
Cubeform said:
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.
 
Top