gfridd Posted April 16, 2006 Share Posted April 16, 2006 I have a php process running on the server that generates a webpage for the client's browser, does some calculateions and lookups, then I want it to clear the client's browser window (same one) and replace it with what the php process calculated. The problem I can't solve is how to blank that window before sending a new set of HTML to create the new window. What happens with whatever I have tried is that the new HTML jsut tacks onto the HTML that's already there. Anyone know how to do this?Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/7565-how-to-get-php-on-server-to-clear-client-screen/ Share on other sites More sharing options...
bonaparte Posted April 17, 2006 Share Posted April 17, 2006 [!--quoteo(post=365401:date=Apr 16 2006, 04:15 PM:name=gfridd)--][div class=\'quotetop\']QUOTE(gfridd @ Apr 16 2006, 04:15 PM) [snapback]365401[/snapback][/div][div class=\'quotemain\'][!--quotec--]I have a php process running on the server that generates a webpage for the client's browser, does some calculateions and lookups, then I want it to clear the client's browser window (same one) and replace it with what the php process calculated. The problem I can't solve is how to blank that window before sending a new set of HTML to create the new window. What happens with whatever I have tried is that the new HTML jsut tacks onto the HTML that's already there. Anyone know how to do this?Thanks![/quote]Does sending a blank page in between serve the purpose? Quote Link to comment https://forums.phpfreaks.com/topic/7565-how-to-get-php-on-server-to-clear-client-screen/#findComment-27704 Share on other sites More sharing options...
redbullmarky Posted April 17, 2006 Share Posted April 17, 2006 [!--quoteo(post=365401:date=Apr 16 2006, 10:15 PM:name=gfridd)--][div class=\'quotetop\']QUOTE(gfridd @ Apr 16 2006, 10:15 PM) [snapback]365401[/snapback][/div][div class=\'quotemain\'][!--quotec--]I have a php process running on the server that generates a webpage for the client's browser, does some calculateions and lookups, then I want it to clear the client's browser window (same one) and replace it with what the php process calculated. The problem I can't solve is how to blank that window before sending a new set of HTML to create the new window. What happens with whatever I have tried is that the new HTML jsut tacks onto the HTML that's already there. Anyone know how to do this?Thanks![/quote]1, you say the new HTML tacks on to the end, but how are you currently sending the HTML to the browser?2, is the process automated, or does it require the user to click/select/type something before the new page is requested? Quote Link to comment https://forums.phpfreaks.com/topic/7565-how-to-get-php-on-server-to-clear-client-screen/#findComment-27712 Share on other sites More sharing options...
gfridd Posted April 18, 2006 Author Share Posted April 18, 2006 [!--quoteo(post=365541:date=Apr 17 2006, 11:06 AM:name=bonaparte)--][div class=\'quotetop\']QUOTE(bonaparte @ Apr 17 2006, 11:06 AM) [snapback]365541[/snapback][/div][div class=\'quotemain\'][!--quotec--]Does sending a blank page in between serve the purpose?[/quote]I assume a 'page' means everything between <html> and </html>. If I send 3 pages from the same PHP process, the middle one being blank if you like, the 3 pages are tacked on one after the other, i.e. making one longer page. Maybe it's Firefox that's the problem????? Quote Link to comment https://forums.phpfreaks.com/topic/7565-how-to-get-php-on-server-to-clear-client-screen/#findComment-28136 Share on other sites More sharing options...
AndyB Posted April 18, 2006 Share Posted April 18, 2006 The 'problem' is that there isn't any browser instruction that clears the display. That said, the 'solution' can only be to direct the browser to a new page, i.e. to a separate script. Quote Link to comment https://forums.phpfreaks.com/topic/7565-how-to-get-php-on-server-to-clear-client-screen/#findComment-28142 Share on other sites More sharing options...
kenrbnsn Posted April 18, 2006 Share Posted April 18, 2006 To the OP:Can you post the script you're using?Try this script (created on the fly)[code]<?phpif (!isset($_GET['action'])) exit('You did not indicate what to do');switch($_GET['action']) { case 'clear': exit(); break; case 'page1': echo '<h1 style="text-align:center">This is Page 1</h1>'; break; case 'page2': echo '<h1 style="text-align:center">Page 2<br>' . date('l, F j, Y \a\t G:i') . '</h1>'; break; default: echo '<p style="text-align:center;font-weight:bold;color:red">This page has been intentionally left blank -- IBM :-)</p>';}?>[/code]Ken Quote Link to comment https://forums.phpfreaks.com/topic/7565-how-to-get-php-on-server-to-clear-client-screen/#findComment-28161 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.