Page 1 of 1

Page Source Problem

Posted: Sun Sep 05, 2010 10:43 am
by ChrisBull
This is really strange, I have created a small little demo to help explain my problem.

I have a page,

Code: Select all

meta data stuff, title, style links etc.

<?php

$viewPage = "one";

//Switch statement goes here and either changes $viewPage or leaves it alone/

?>
<body>
<?php require_once( $viewPage )?>
</body>
The person who views the page always views the "one" page first and then the page is refreshed and the 'switch statement' changes the value to display a different page. This is all working perfectly. BUT after the refresh and the page displays different content, if i right click and view source, the page source has the code from the previous page, the "one" page???? Doesnt make any sence, normally I wouldnt mind, but it stops all of the <a> tags from working that are in the new content.
ANyone know how to fix this???

Many Thanks
Chris

Re: Page Source Problem

Posted: Sun Sep 05, 2010 12:10 pm
by josh
You're going to replace the problematic part with an un-helpful comment and expect us to solve the problem anyways? We're a community of programmers, not wizards ;-)

For your information, viewing source may or may not issue another request. That isn't guaranteed to you by any standards. Its totally left up to the browser & browser configuration.

Re: Page Source Problem

Posted: Sun Sep 05, 2010 12:40 pm
by ChrisBull
Um thanks i guess can't quite tell if i should feel insulted though... either way i took on what you said and tested it in firefox instead of chrome and the page source shows what its meant to, the a tag not working was because i missed the = sign silly me.

Re: Page Source Problem

Posted: Sun Sep 05, 2010 1:53 pm
by josh
ChrisBull wrote:Um thanks i guess can't quite tell if i should feel insulted though....
Not intended in a negative manner, just my way of communicating how to help us help you

Re: Page Source Problem

Posted: Sun Sep 05, 2010 2:01 pm
by Jonah Bron
josh wrote:
ChrisBull wrote:Um thanks i guess can't quite tell if i should feel insulted though....
Not intended in a negative manner, just my way of communicating how to help us help you
Observe the winking emoticon.