benniog
09-26-2006, 03:25 AM
Hi all,
This is my first post so hope you can help.
I have two forms on two seperate pages. The first form contains a drop down containing a list of Authors. From this first form you can open a popup window that contains a form that allows you to add an author. When the user submits the form I want the child window to close and the parent window to refresh and change the intially selected author from the authors list to the new one. The code that I am using at the moment is:
function closepopUp(i) {
opener.location.reload(true);
opener.document.marginForm.author_id.options[i].selected=true;
self.close();
}
marginForm = name of form
author_id = name of drop down (select menu)
I am calling this function from the popup window but it doesnt seem to work.
Can anyone provide me with any pointers - i'm getting desperate
Thanks in advance
Gary
This is my first post so hope you can help.
I have two forms on two seperate pages. The first form contains a drop down containing a list of Authors. From this first form you can open a popup window that contains a form that allows you to add an author. When the user submits the form I want the child window to close and the parent window to refresh and change the intially selected author from the authors list to the new one. The code that I am using at the moment is:
function closepopUp(i) {
opener.location.reload(true);
opener.document.marginForm.author_id.options[i].selected=true;
self.close();
}
marginForm = name of form
author_id = name of drop down (select menu)
I am calling this function from the popup window but it doesnt seem to work.
Can anyone provide me with any pointers - i'm getting desperate
Thanks in advance
Gary