Topher
04-06-2004, 12:57 PM
Right, the problem is thus (I hope this makes sense)...
I have a script whereby I have a select box of options with a list of regular options that would normally be picked - but - on the odd occasion I will need to create another option, the details for which will need to be searched for.
So I have a button, which onClick brings up a search page in a pop-up window and when you click one of the search results it creates a new option in the select box of the previous window - or should.
Problem is I don't know how to refer to the previous window, parent.document.etc... doesn't seem to work, as I thought, as the pop-up window is not a child element of the window itself. The window unfortunately will have been opened from scratch so it won't have a name.
Anyone know a fix for this? Either to name a window that's already open or another solution?
The code to open the window is a normal window.open code:
function player_up(url,player) {
window.open(url,player,'width=500,height=250,left=15,top=15,location=no,menubar=no,resizable=no,scro llbars=yes,status=no,toolbar=no,fullscreen=no');
} // End of function
Like I said, hope I've made sense there, I'm not the best at explaining things, but I don't think posting lines of code would help in this instance.
I have a script whereby I have a select box of options with a list of regular options that would normally be picked - but - on the odd occasion I will need to create another option, the details for which will need to be searched for.
So I have a button, which onClick brings up a search page in a pop-up window and when you click one of the search results it creates a new option in the select box of the previous window - or should.
Problem is I don't know how to refer to the previous window, parent.document.etc... doesn't seem to work, as I thought, as the pop-up window is not a child element of the window itself. The window unfortunately will have been opened from scratch so it won't have a name.
Anyone know a fix for this? Either to name a window that's already open or another solution?
The code to open the window is a normal window.open code:
function player_up(url,player) {
window.open(url,player,'width=500,height=250,left=15,top=15,location=no,menubar=no,resizable=no,scro llbars=yes,status=no,toolbar=no,fullscreen=no');
} // End of function
Like I said, hope I've made sense there, I'm not the best at explaining things, but I don't think posting lines of code would help in this instance.