code only works once
Posted: Mon Apr 21, 2003 3:47 am
Hi,
I'm trying to put a magazine on the internet. Each page is a jpg-file, the
files are numbered in order (000.jpg, 001.jpg...). The site consists of a
frameset, the top frame (zeit_seite.php) displays the page, the bottom frame (zeit_nav.php) handels the navigation using PHP. In zeit_nav.php the back-button has the following code:
<?
//Back-Button
echo '<a href="zeit_nav.php?datei=' . length3(neg2null($_GET['datei']-1)) . '&rot=0&titel=' . datei2titel(length3(neg2null($_GET['datei']-1))) . '" target="_self"> <img src="zeitung/pics/bw_prev.gif" width="32" height="32" border="0" onClick="parent.mainFrame.location=''zeit_seite?datei=' . length3(neg2null($_GET['datei']-1)) . '&rot=0''"> </a></td>';
?>
Thus, when you click the button, a new navigtion page is generated (the
variables rot and titel are not really important here) in the bottom frame
and also the top frame is passed the new information which page to load
next. This works fine - but only once. When I have the last page loaded (by a standard link) and click the back-button, the previous page appears as it should. However, when I click the back-button again, nothing happens (i.e. the page reloads but it is exactly as before). The same is (respectivley) true for the next-button. Is there any explanation that the button works only once? Any help would be appreceated!
Greetings,
Michael Goerz
I'm trying to put a magazine on the internet. Each page is a jpg-file, the
files are numbered in order (000.jpg, 001.jpg...). The site consists of a
frameset, the top frame (zeit_seite.php) displays the page, the bottom frame (zeit_nav.php) handels the navigation using PHP. In zeit_nav.php the back-button has the following code:
<?
//Back-Button
echo '<a href="zeit_nav.php?datei=' . length3(neg2null($_GET['datei']-1)) . '&rot=0&titel=' . datei2titel(length3(neg2null($_GET['datei']-1))) . '" target="_self"> <img src="zeitung/pics/bw_prev.gif" width="32" height="32" border="0" onClick="parent.mainFrame.location=''zeit_seite?datei=' . length3(neg2null($_GET['datei']-1)) . '&rot=0''"> </a></td>';
?>
Thus, when you click the button, a new navigtion page is generated (the
variables rot and titel are not really important here) in the bottom frame
and also the top frame is passed the new information which page to load
next. This works fine - but only once. When I have the last page loaded (by a standard link) and click the back-button, the previous page appears as it should. However, when I click the back-button again, nothing happens (i.e. the page reloads but it is exactly as before). The same is (respectivley) true for the next-button. Is there any explanation that the button works only once? Any help would be appreceated!
Greetings,
Michael Goerz