Window.opener: changing form information in parent through child

I am struggling with a, after I saw the other questions in those forum, very stupid javascript problem. I'm not at all known with javascript, and the book I use to learn it is too hard for me :P, so please keep your help as simple as possible...

The page "upload.php" opens a window (window.open, opening arselect.php), so far everything works. The popup runs some php code, and then returns search results. When I click on one of those results, a textbox in the main page ("upload.php") has to get the value of the name of the link.
Currently this is my code:

<?
while($ses = mysql_fetch_assoc($result)){
?><a href="" onClick="window.opener.document.upload.artist.value = "<? echo $ses['name'] ?>";"><? echo $ses['name'] ?></a><br><?
$i++;
}

The problem is: the textbox doesn't change at all. When I click the link generated by that piece of php code, the popup does reload, but that's all.

The form in which the text has to be changed is called "upload", and the specific textbox is called "artist".
I don't really see my problem :s

Any help is really appreciated!
[1220 byte] By [StevDevil] at [2007-11-20 5:00:20]
# 1 Re: Window.opener: changing form information in parent through child
You explained what you want to do, but you did not explain what is not working. Also, that will tell us what code we will need to see. What you have already posted is of little use.
PeejAvery at 2007-11-8 0:41:47 >
# 2 Re: Window.opener: changing form information in parent through child
My excuses I already thought I forgot something.
The problem is: the textbox doesn't change at all. When I click the link generated by that piece of php code, the popup does reload, but that's all.

If you need any more code please ask but as far as I can see there's nothing more useful (but as said I don't know a lot about js)

Thanks!
StevDevil at 2007-11-8 0:42:47 >
# 3 Re: Window.opener: changing form information in parent through child
I would suggest using Firefox. In Firefox, under the Tools menu, there is an item called Error Console. It is a very useful JavaScript debugger. Try that and post back if you can't solve it.
PeejAvery at 2007-11-8 0:43:46 >
# 4 Re: Window.opener: changing form information in parent through child
I tried it and it said it's a syntax error: I copied the code which was wrong:

<a href="" onClick="window.opener.document.upload.artist.value = "Muse";">

Exactly the part Muse";" was indicated in red.
What does it have to be?
(Muse is a value returned by the php-script mentioned above)

Thanks!
StevDevil at 2007-11-8 0:44:46 >
# 5 Re: Window.opener: changing form information in parent through child
It looks like you have some PHP echoing the "; part. You need to make it read...
No spaces next to equal signs.
<a href="" onClick="window.opener.document.upload.artist.value="Muse"
PeejAvery at 2007-11-8 0:45:45 >