my site has a page which contains java applet
now i want to execute a program whenever this page is loaded and stop the program when page exits.
the program will be infact a php code which will create a table and after every 5 sec it will update the table..
any1 can tell me how it can be done
need help on executing program
Moderator: General Moderators
-
bugthefixer
- Forum Contributor
- Posts: 118
- Joined: Mon Mar 22, 2004 2:35 am
-
bugthefixer
- Forum Contributor
- Posts: 118
- Joined: Mon Mar 22, 2004 2:35 am
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Does your server allow mid-script echos to print before the page is finished processing? Do you want to replace the table printed, or do you mind having many tables printed? Do you mind some (possible) browser incompatiblity for this?
if yes to the first question and yes to the first part of the second question:
You can use Javascript to replace the table that you output for each pass of the loop you'll create.
if yes to the first question and no to the second part of the second question:
You can output a new table every 5 seconds then.
For the two solutions I just gave, in my experiments with things like this, PHP often didn't acknowledge that I canceled the page, or navigated away, so beware.
if no to the last question:
You can use an iframe or frames to load this "program" page. Add a refresh and it takes care of user navigating away problem of the above solutions.
if yes to the first question and yes to the first part of the second question:
You can use Javascript to replace the table that you output for each pass of the loop you'll create.
if yes to the first question and no to the second part of the second question:
You can output a new table every 5 seconds then.
For the two solutions I just gave, in my experiments with things like this, PHP often didn't acknowledge that I canceled the page, or navigated away, so beware.
if no to the last question:
You can use an iframe or frames to load this "program" page. Add a refresh and it takes care of user navigating away problem of the above solutions.
-
bugthefixer
- Forum Contributor
- Posts: 118
- Joined: Mon Mar 22, 2004 2:35 am
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
stick the following in the header section of the framed html
Code: Select all
<meta http-equiv="refresh" content="5">