Jump to content

how to get php on server to clear client screen


gfridd

Recommended Posts

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!
[!--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?
[!--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?
[!--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?????
To the OP:

Can you post the script you're using?

Try this script (created on the fly)
[code]<?php
if (!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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.