Page 1 of 1
Need a little help
Posted: Tue Aug 12, 2003 3:31 pm
by lparnau

Really embarrassed
I am looking for or to write a small script that will call a new browser then close it after a set amount of time.
I understand programming but php is completely new to me. Can any one point me in the right direction. Need to find the syntax for calling a new browser, etc.
Len
Posted: Tue Aug 12, 2003 5:13 pm
by qartis
Nope, Javascript is what you're looking for. Try this:
Code: Select all
<script>
window.open('your_page.php?get_var=value');
</script>
.. to open a new window, and then inside the new window's code, put this:
Code: Select all
<script>
seconds = 5;
millsec = seconds * 1000;
setTimeout("self.close()",millsec);
</script>
Change 'seconds =' to your desired time delay (can be a float, eg. 3.75 seconds) and you're good to go.