Jump to content

multiple pop-ups loading the same page


legohead6

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.