Simple Frame Problem *sigh*
| From: | C. Marcera | Date: | Wed, 02 Aug 2000 20:46:32 +0000 |
| Subject: | Simple Frame Problem *sigh* | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9822@lists.php.net to get a copy of this message | ||
Alright, index.htm contains simply:
<FRAMESET ROWS="*,60" FRAMESPACING=0 MARGINHEIGHT=0 MARGINWIDTH=0>
<FRAME NAME="top" SRC="main.php3">
<FRAME NAME="bottom" SRC="nav.php3" SCROLLING="NO">
</FRAMESET>
For simplicity, I just wanted to get the top frame to display "1".
The bottom frame contains 2 buttons, "Prev" and "Next".
"Prev" should decrease the number in the top frame by 1, or if at one, goto
a specified HTML page.
"Next" should increase the number in the top frame by 1.
I set the variable $id to "1" on the first time loading the page in
nav.php3.
if( $id == "" ) {
$id = "1";
}
My buttons look like this:
<FORM METHOD=POST ACTION="main.php3" TARGET="top">
<INPUT TYPE="hidden" NAME="direction" VALUE="backward">
<? if( $id != "1" ) {?>
<INPUT TYPE="hidden" NAME="id" VALUE="<? echo $id++
?>">
<? } else { ?>
<INPUT TYPE="hidden" NAME="id" VALUE="<? echo $id ?>">
<? } ?>
<INPUT TYPE="submit" VALUE="Prev">
</FORM>
<FORM METHOD=POST ACTION="main.php3" TARGET="top">
<INPUT TYPE="hidden" NAME="direction" VALUE="forward">
<? if( $id != "1" ) {?>
<INPUT TYPE="hidden" NAME="id" VALUE="<? echo $id-1
?>">
<? } else { ?>
<INPUT TYPE="hidden" NAME="id" VALUE="<? echo $id ?>">
<? } ?>
<INPUT TYPE="submit" VALUE="Next">
</FORM>
I realize my problem is the $id variable is not getting updated in nav.php3
and will always be 1...
How can I change $id in both frames without reloading the bottom frame??
I might as well have a table on the page looking like 2 frames if both have
to be reloaded everytime
and that's the look I'm trying to avoid.
Thanks for any help!
--
C. Marcera
==========
Computer & Network Services
Press Enterprise Inc.
TEL 570.784.2121
FAX 570.784.3057