I have the following script in a page and it gets an error in IE 6. Says
something about an invalid
argument but the line number doesn't help since I can't see the javascript
code when viewing source.
I have this script in a popup page where the user selects a user ID (id) and
that value is then placed
into one of the parent window's form text field called "userId". This
script works fine in the latest
Mozilla and Mozilla Firefox but not in IE 6. Any help on why this script
might not work or a
better way of accomplishing this task would be appreciated. Thank you.
derek
<script language="javas cript">
function userSelected(id )
{
var w = window.opener;
if (w && !w.closed)
{
if (w.document)
{
var e = w.document.getE lementsByName(" userId");
for (i = 0; i < e.length; i++)
{
if (e[i].type == "text")
{
e[i].value = id;
break;
}
}
}
}
window.close();
}
</script>
something about an invalid
argument but the line number doesn't help since I can't see the javascript
code when viewing source.
I have this script in a popup page where the user selects a user ID (id) and
that value is then placed
into one of the parent window's form text field called "userId". This
script works fine in the latest
Mozilla and Mozilla Firefox but not in IE 6. Any help on why this script
might not work or a
better way of accomplishing this task would be appreciated. Thank you.
derek
<script language="javas cript">
function userSelected(id )
{
var w = window.opener;
if (w && !w.closed)
{
if (w.document)
{
var e = w.document.getE lementsByName(" userId");
for (i = 0; i < e.length; i++)
{
if (e[i].type == "text")
{
e[i].value = id;
break;
}
}
}
}
window.close();
}
</script>
Comment