Jump to content

Archived

This topic is now archived and is closed to further replies.

mikeh623

Popup closes but doesn't send to target

Recommended Posts

I have a popup window named 'admin.' It launches another popup with several links. Those links have src and target attributes, their target is the admin window. They also have an onClick attribute of "self.close()" so that the window will close when the link is pressed.

In Internet Explorer this works perfectly, the link is clicked, direction is sent to 'admin' and then it closes and admin takes over from there.

In FireFox this does not work at all as planned. You click the link and the window closes without sending direction to admin.

Please assist. Thanks!

Share this post


Link to post
Share on other sites
Hi,,

Maybe if you post some code lines about your popup function, we could test it & help more,,...

In my first opinion, your problem could be about the 'src' attribute...
Because I've tested that firefox doesn't like when you change some elements attributes (like onclick, onchange, etc...)
So, you should try using the setAttribute / getAttribute methods,...

Hoping it helps,,

l8tr,,

Share this post


Link to post
Share on other sites
The link code:
[code]
<a href=\"admin_ops.php?op=addClan&pid={$pid}&cid={$clan}&lid={$lads['ladderid']}
        &clan={$clan_name}\"
        target=\"admin\" onClick=\"self.close();\">Add to Clan</a>
[/code]

The function code used to open the window that the above link is in:
[code]
<script language=\"javascript\" type=\"text/javascript\">
                    popup_win = null;
                    function newwin() {
                       popup_win = window.open('clanAddition.php','clanAddition','width=300,height=250,toolbar=no,location=no,\
                     directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');    }
                   </script>
[/code]

The function code used to open the 'admin' window which direction should be sent to:
[code]
<script language=\"javascript\" type=\"text/javascript\">
            function admin()
            {
                window.open('admin/index.php','admin','width=800,height=516,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
            }
            </script>
[/code]

When you click the top link, the window should close and direction sent to the admin window, the parent window of the window containing the link. This works fine in Internet Explorer, but in Firefox, the window closes and nothing more happens.

Note: The &#39 above is not in my code, for some reason it is showing up in the post.

Thanks.

Share this post


Link to post
Share on other sites

×

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.