skarphace
12-16-2003, 10:24 PM
Ok, I am new to Javascript but it seems a lot like php syntax, except for variables... My problem is referencing the parent window. The goal is to have a form with a link. The link will popup a new window with a list of users, this list will be links. These links, should, change the value of the username box in the parent window. The script below returns an error of "sendBack is not defined" and is in the new window with the user list.
<script type="javascript">
<!--
var usernm=" ";
function sendBack(usernm) {
opener.document.testform.user.value=usernm;
return true;
}
//-->
</script>
<a href="javascript:sendBack('[username]')">[username]</a>
Any help would be appreciated. I'm very stuck.
<script type="javascript">
<!--
var usernm=" ";
function sendBack(usernm) {
opener.document.testform.user.value=usernm;
return true;
}
//-->
</script>
<a href="javascript:sendBack('[username]')">[username]</a>
Any help would be appreciated. I'm very stuck.