Need a little help

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
lparnau
Forum Newbie
Posts: 15
Joined: Tue Aug 12, 2003 3:31 pm

Need a little help

Post by lparnau »

:oops: 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
qartis
Forum Contributor
Posts: 271
Joined: Sat Dec 14, 2002 4:43 pm
Location: BC, Canada
Contact:

Post 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.
Post Reply