Jump to content

Popup closes but doesn't send to target


mikeh623

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!
Link to comment
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,,
Link to comment
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.
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.