Firefox Error: window.opener.broadcast has no properties

Discussion in 'JavaScript' started by joshua__lim, Oct 2, 2008.

  1. #1
    Hi, i'm 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:
    window.opener.broadcast has no properties line 14.
    Code (markup):
    The error is on line 14:
    if (window.opener.broadcast.destination.value=="")
    Code (markup):
    Full 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>
    
    
    Code (markup):
    I'm new to Javascript, would really appreciate any help. Thank you. :)
     
    joshua__lim, Oct 2, 2008 IP