Page 1 of 1

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

Posted: Wed Dec 09, 2009 3:30 pm
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

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

Posted: Wed Dec 09, 2009 3:38 pm
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?

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

Posted: Wed Dec 09, 2009 4:01 pm
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