...

View Full Version : Loading info of a popup into an iframe



Stoffel
01-15-2003, 01:28 PM
Hiya,

I have an iframe, and in that iframe there is a button, that opens a popup window when I click on it. On that popup window there are several names. When I click on a name it should return to a textbox in a form in the iframe.

The scrips works perfect when I dont use the iframe.
(found the code here http://www.codingforums.com/showthread.php?s=&threadid=12523 )

The iframe's name is 'hoofd' (if u need it, the name of the file where it has to write in is ned/verkoop.html)
Here is the script from the popup


<script>
function putLabel(lbl){
if (opener && !opener.closed){
opener.document.formulier.filmnaam1.value=lbl;
window.close();
}
}
</script>


<a href="javascript:putLabel('Text')">Text</a>

Hope u can help me

allida77
01-15-2003, 02:20 PM
Try:

opener.document.frames('hoofd').document.formulier.filmnaam1.value=lbl;

Stoffel
01-15-2003, 02:35 PM
It doesn't work :(

Stoffel
01-16-2003, 01:19 PM
Woohoo

It works,
Don't ask me how, but I managed to let it work.

Thnx anyway

walkerrv
12-09-2005, 09:33 PM
I have the exact same situation as this, however I can't get it to work.

Below is my code:

<script type="text/javascript">
function setPartValue(partID){
if (opener && !opener.closed){
opener.document.frames('partSelection').document.partSelect.idString.value=partID;
window.close();
}
}
</script>

I am using the the following link to execute my javascript:

<a onclick="Javascript:setPartValue('text');">

The following is the error I receive:

Error: Exception Occured.

I am at a lost, I can't see the tree for the forest.

Any help would be appreciated.

_Aerospace_Eng_
12-09-2005, 09:36 PM
Is that the error you get in IE or Firefox? Posting a link to the page would be helpful.

walkerrv
12-09-2005, 09:51 PM
I can't give you a link to the website, because it is a secure internal website.

It is in IE.

Not much help but this is kicking my butt.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum