[Javascript] Closing a popup window [Spam][60.1%]

Javier javier at viventura.de
Wed Nov 24 14:32:07 CST 2004


Thank you Flavio, I made: parent.close();
The data was sent by usign an iframe, that's why
it hasn't worked.

Javier


Wednesday, November 24, 2004 9:40 AM
Flavio Gomes <flavio at economisa.com.br>:

> <script language="JavaScript">
>      parent.opener.setTransfer('$sID','$sField');
>      self.close();
> </script>
> 
> self.close();
>   or
> window.close();
> 
>  will work if you run these in the 'child' (just opened) window.
> 
>  Hope it helps
> 
>> Hello everybody:
>> 
>> I've a formular, that calls to a popup window. When something is done
>> in the popup window, then some data is sent to the formular.
>> I use for example the following function, for transfering the
>> information to the formular:
>> 
>> <script language="JavaScript">
>>     parent.opener.setTransfer('$sID','$sField');
>>     self.close();
>> </script>
>> 
>> 
>> The function setTransfer in the formular looks like:
>> 
>> function setTransfer(PhototextID,field)
>> {
>>    document.frmRegister.elements[field].value=PhototextID + ".jpg";
>> }
>> 
>> I want to close the popup-window, when the 'setTransfer' function
>> is called. I've try with: "parent.caller.close", but the parent
>> object is null, any suggestions?
>> 
>> 
>> 
>> Javier
>> 
>> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list