Opening one window while closing the current using JavaScript andPHP...

E

Eric B Venet

Hello, all. Here's a good one. :)

I have a PHP script embedded in a web page whose function is to insert
some data and then open an interface page where the user may see the
results of his insert.

I would like to close the page containing the script after the interface
page opens, and I'm running into a bit of a problem.

Essentially, my code (after PHP generation) appears as follows:

<meta http-equiv="refresh"
content="0;url=javascript:void(window.open('../employer.php?BEACON_ID=8','',''));">

<meta http-equiv="refresh" content="0;url=javascript:window.close();">

With both pieces of code, the script page stays open after the interface
page has opened.

Am I doing something wrong? Is it possible that there can be only one
meta http-equiv tag in an HTML document?

Also, I have been scolded (on this very newsgroup, no less) for using
"javascript:" before my functions. While I think I understand why such
a thing is unnecessary, neither of those pieces of code work when I
remove it.

Help would be much appreciated.

Fond regards,
Eric B Venet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top