Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Help for Firefox Error: window.opener.broadcast has no properties

    Hi to all , i'm a newbies, having this problem in firefox (it works fine in IE).

    The error occurs in the popout window when i try to do a window.opener on the parent window.

    Error Console:
    Code:
    window.opener.broadcast has no properties line 14.
    The error is on line 14:
    Code:
    if (window.opener.broadcast.destination.value=="")
    Full code:
    Code:
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
    <link href="../../HTML/eng/text.css" rel="stylesheet" type="text/css">
    </head>
    <Script language="Javascript">
    function adduser(ownername)
    {
     if (window.opener.broadcast.destination.value=="")
     {
       window.opener.broadcast.destination.value=ownername;
     }
     else
     {
        window.opener.broadcast.destination.value=window.opener.broadcast.destination.value+','+ownername;
     }
     return false;
    }
    </Script>
    <body bgcolor="#FFFFFF" text="#000000">
    Add user into receiver: <br>
     <br> 
    
    <table width="80%" border="0" cellpadding="3" cellspacing="1" bgcolor="#000000">
      <tr bgcolor="#F2F2F2">
        <td width="40%">User Name</td>
        <td>Action</td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td>&nbsp; 
          test
        </td>
    
        <td>
        <a onclick="adduser('test');return false;" href="#">Add</a></td>
      </tr>
    </table>
    
    <p><a href="adduser.php?&curpagenum=1">1</a>&nbsp;&nbsp;</p>
    </body>
    </html>
    I'm new to Javascript, would really appreciate any help. Thank you.

  • #2
    Banned
    Join Date
    May 2006
    Location
    England
    Posts
    664
    Thanks
    0
    Thanked 84 Times in 84 Posts
    Quote Originally Posted by touchring View Post
    Hi to all , i'm a newbies, having this problem in firefox (it works fine in IE).

    The error occurs in the popout window when i try to do a window.opener on the parent window.

    Error Console:
    Code:
    window.opener.broadcast has no properties line 14.
    What is broadcast in the parent window? Presumably a form. I.E. tolerates direct referencing but for anything else you need:
    Code:
    //if broadcast is a name:
    window.opener.document.forms.broadcast.
    
    //if broadcast  is an ID:
    window.opener.document.getElementById('broadcast').

  • Users who have thanked Arty Effem for this post:

    touchring (10-04-2008)

  • #3
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks Arty, this solves the problem.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •