How to open and close many browser windows on a web page?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wwuster
Forum Newbie
Posts: 6
Joined: Sat Nov 08, 2008 6:01 am

How to open and close many browser windows on a web page?

Post by wwuster »

I have a php program that runs on a web server and processes data in a database table. I need to open a new browser window or tab and then closed it for each row of the table. This needs to be done in a php loop in a function pretty far down into the the web page. What is the best way to do this?

thanks,
William
AliJ
Forum Commoner
Posts: 32
Joined: Sun Dec 06, 2009 8:03 pm

Re: How to open and close many browser windows on a web page?

Post by AliJ »

Hmm....Well your tying to open the same php script in an other tab. But you want it to show an other table, right?
wwuster
Forum Newbie
Posts: 6
Joined: Sat Nov 08, 2008 6:01 am

Re: How to open and close many browser windows on a web page?

Post by wwuster »

AliJ wrote:Hmm....Well your tying to open the same php script in an other tab. But you want it to show an other table, right?
I have 6 table entries, so I tried printf("<script language=\"javascript\"> <!-- window.open("$url") --> </script>" );

This opened 6 TABS in firefox. I then modified it to:

printf("<SCRIPT LANGUAGE=\"javascript1.2\">
<!--
window.open(\"$url\", \"mywin\", \"status=0, location=1, scrollbars=1, menubar=0, resizable=1, width=700, height=500\")
-->
</SCRIPT>"
);

This opened a separate window, but only one of the 6. I need the window to be modal and when I close it open the next window, etc. Can this be done?

William
Post Reply