Well, just to point out what may be known already. PHP code is never sent to a visitors browser, it is all parsed out before the content is sent. There is no direct way to make javascript interact with php, aside from just passing form variables as you are doing.
Since the frames are on the same page, you might be able to do something like this
frame 1
Code:
<FORM name="testForm" METHOD=GET ACTION=<?php echo $PHP_SELF?>>
<?php
$i = $_GET["temp"];
if(isset($_GET["full"]))
{
++$i;
}
echo $i;
?>
<INPUT TYPE=SUBMIT NAME="full" VALUE="GO">
<INPUT TYPE=HIDDEN NAME="temp" VALUE="<?php echo $i?>">
<script language="javascript">
parent.frame2.testForm.temp.value = <? echo $i ?>;
</script>
</form>
Frame two would jsut simply be
Code:
<FORM target="frame1" name="testForm" METHOD=GET ACTION=frame1.php>
<INPUT TYPE=SUBMIT NAME="full" VALUE="GO">
<INPUT TYPE=HIDDEN NAME="temp" VALUE="">
</form>
So when frame1 loads, it updates the form value on frame2 with the value of i
then frame2 submits i back to frame1, and the cycle starts again.