...

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



touchring
10-03-2008, 11:02 AM
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:

window.opener.broadcast has no properties line 14.

The error is on line 14:

if (window.opener.broadcast.destination.value=="")

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>



I'm new to Javascript, would really appreciate any help. Thank you. :)

Arty Effem
10-03-2008, 05:44 PM
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:

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:

//if broadcast is a name:
window.opener.document.forms.broadcast.

//if broadcast is an ID:
window.opener.document.getElementById('broadcast').

touchring
10-04-2008, 09:07 AM
Thanks Arty, this solves the problem. :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum