php and javascript reload on frame

Bryce C plug-discuss@lists.plug.phoenix.az.us
31 Mar 2003 18:31:38 -0700


--=-DRksx9e1smblTY9mz3EH
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Try the following. It uses html's meta refresh tag instead.

<html>
<?php
if($update) echo '<head><META HTTP-EQUIV=3D"Refresh" CONTENT=3D"5"></head>'=
;
?>
<body>
<?php
//Clicked update?
if($update) echo "<p>Your records have been updated. Your browser should
refresh in 5 seconds to show all the changes in the left margin.</p>";
else {
?>

<form method=3D"post">
<input type=3D"submit" name=3D"update" value=3D"Update" />
</form>
</body>
</html>

<?
//This section is printed only if they have not logged in yet.
  }
} else {
?>
<html>
<head>
<body>
<? } ?>
</body>
</html>



On Mon, 2003-03-31 at 16:20, Mike Starke wrote:
> I am still having a difficult time getting a
> frame to automagically reload. Below is a edited
> version of a php script/page I am using.
> ---------------------------------------------------------------
> <html>
> <body>
>   <?
>   // run this section to update the database if they clicked "Update"
>   if ($update) {
>     echo "<p>Your records have been updated. You may have to hit the 'ref=
resh'
>     button on your browser for all changes to appear in the left margin.<=
/p>";
>     echo "\n<!-- \n<script type=3D\"text/javascript\">\n";
>     echo "parent.left.location.reload();\n";
>     echo "</script> \n-->\n";
>   } else {
>   ?>
>=20
> <form method=3D"post">
> <input type=3D"submit" name=3D"update" value=3D"Update" />
> </form>
> </body>
> </html>
>=20
> <?
> //This section is printed only if they have not logged in yet.
>   }
> } else {
> ?>
> <html>
> <head>
> <body>
> <? } ?>
> </body>
> </html>
> -------------------------------------------------------------------
> I editred most all of the other code/html as I didn't think it
> was important. Everything works except my left frame reloading.
>=20
> The "page" is divided into three (3) frames: top, left, right. In fact,
> those are the names. The code above is displayed in the right (or main) f=
rame,
> and I would like for it to refresh/reload the left side.
>=20
> The javascript console in Mozilla tells me "parent.left has no properties=
"
>=20
> I sure would apprecitate some help on this one.
>=20
> v/r
> -Mike
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change  you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
--=20
Bryce C <Plug@BryceCo.Net>
CoBryce Communications

--=-DRksx9e1smblTY9mz3EH
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA+iOv5/wbq/C6yyPcRAg2OAJ9qDetJMTQk2wpqKqtqPSsN233N1QCaAmzF
G2Rj8Rse/Ko4BEFSV80xzSU=
=4so9
-----END PGP SIGNATURE-----

--=-DRksx9e1smblTY9mz3EH--