legohead6 Posted May 15, 2008 Share Posted May 15, 2008 This may be more javascript, but im hoping someone can help me out. i have a file management site, and currently if you open up a file then it will close when you open another. I would like to fix that. here is the segment of code that i have. echo "<script> var newwindow; function poptastic(url) { newwindow=window.open(url,'name','height=400,width=400,scrollbars=yes,toolbars=no'); if (window.focus) {newwindow.focus()} } </script>"; $file3 = @str_replace("_"," ", "$file"); echo "<tr><td bgcolor=#B4B4B4><p align=center><a href=\"#\" onClick=\"poptastic('doc.php?f=$doc');\">$file3</p></td><td bgcolor=#B4B4B4>"; echo "<a href=move.php?f=$doc&fo=$folde>Move File</a></td><td bgcolor=#B4B4B4><a href=move.php?f=$doc&d=1>Delete File</a></td><td bgcolor=#B4B4B4><a href=sfile.php?f=$doc>Send File</a></td><td bgcolor=#B4B4B4><a href=doc.php?f=$doc&DD=1>Download</a></td></tr>"; Link to comment https://forums.phpfreaks.com/topic/105686-multiple-pop-ups-loading-the-same-page/ Share on other sites More sharing options...
blackcell Posted May 15, 2008 Share Posted May 15, 2008 Try this and let me know if it works. <?php $file3 = @str_replace("_"," ", "$file"); echo "<tr> <td bgcolor=#B4B4B4 onClick=\"$doc=window.open('doc.php?f=$doc','$doc','toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=1000,height=600'); return false;\"> $file3 </td> <td bgcolor=#B4B4B4> <a href=move.php?f=$doc&fo=$folde>Move File</a> </td> <td bgcolor=#B4B4B4> <a href=move.php?f=$doc&d=1>Delete File</a> </td> <td bgcolor=#B4B4B4> <a href=sfile.php?f=$doc>Send File</a> </td> <td bgcolor=#B4B4B4> <a href=doc.php?f=$doc&DD=1>Download</a> </td> </tr>"; ?> It basically pops a window named the name of the file. Link to comment https://forums.phpfreaks.com/topic/105686-multiple-pop-ups-loading-the-same-page/#findComment-541491 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.