Re: The Refresh Problem
| From: | Matthew Leverton | Date: | Tue, 11 Jul 2000 20:35:20 +0000 |
| Subject: | Re: The Refresh Problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-6008@lists.php.net to get a copy of this message | ||
You'll have to use some JavaScripting on the client side. Since you
don't know exactly what to put in the top frame when the user clicks
in the bottom frame (because the id might be wrong), you'll have to
do it like this:
User Clicks on Button in Bottom Frame -> goes to page "bpage.php4"
- bpage.php4 -
<?php
echo "<html>";
echo "<script type='text/javascript'>";
if_good_id($id)
{
echo "parent.top_frame.location.href = 'tpage_good.php4';
}
else
{
echo "parent.top_frame.location.href = 'tpage_bad.php4';
}
echo "parent.middle_frame.location.href = 'mpage.php4';
echo "</script>";
?>
<body>this is the bottom frame</body>
</html>
-- end of page --
If you've never used JavaScript, then it will look confusing. Remember that
PHP happens first and creates a dynamic HTML/Javascript page. Your browser
then executes the HTML page. In the file I outlined above, the browser will
immediately then execute the <script> and change the top page and middle
frames. Play around with it, and if you have any questions feel free to
email me. (Note that you'll have to replace the names of the files and
frames with whatever you are using.)
--
Matthew Leverton - matthew@aeroinc.net -
http://www.allegro.cc
-----Original Message-----
From: Sergio A. Murillo <sam@unah.hondunet.net>
To: 'Php-General <php-general@lists.php.net>
Date: Tuesday, July 11, 2000 3:12 PM
Subject: [PHP] The Refresh Problem
>I have a 3 frame web page. Top, Main, Bottom frames. At the bottom frame I
>have a php script that has a form for your ID. This will connect to a mysql
>db and get some info of the user. My problem is that when I press the OK
>button I need to refresh the Top and Main frames. How can i do this?
>Also if the Id is worng I need to open a page on the top frame and not the
>bottom.
>
>How can I "execute" a php sricpt from another script and output to a frame?
>
>Any ideas? I was thinking on html headers.. My Html skills really suck!
>
>
>Thanks
>
>Sergio
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>