Good Morning Felix,

   Worked like a champ ! Thanks.  This seems counter-intuitive since  
what I wanted to close (and was able to with your suggestion) was a  
child window.

When I tried top.Windows.close('id') and added alert displays to window.js

::
   // Closes a window with its id
   close: function(id, event) {
     var win = this.getWindow(id);
     // alert('win  ' + win);
     // alert('win ID  ' + id);
     // alert('win Event  ' + event);
     if (win)
       win.close();
     else
             // alert('No win ' + win);
     if (event)
       Event.stop(event);
   },
::

the alert returned: ' win undefined '.

With parent.Windows.close(id), the alert returned: ' win object ',  
then closed the window.

I will be renaming http://www.webtdo.com/index.html to
http://wwww.webtdo.com/prototypeWindowsClose.html, so others who may  
want to review my question will be able to.

Javascript is definitely one of my weak points in my web programming arsenal.

Thanks again.

Scot L. Diddle, UPS Freight, Richmond VA


Quoting Felix Shnir <[EMAIL PROTECTED]>:

> try parent.Windows.close(id)
>
>
>
> On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> Hi Felix,
>>
>>   Thanks for the feedback... I really want to figure out how to do this.
>>
>>   The application I am working on is on an Intranet, and not viewable
>> from the outside world.  However, if you will point your browser to:
>> http://www.webtdo.com you will see an explanation (complete with
>> screen-shots) of what I am trying to accomplish, and how I am trying
>> to invoke the "top.Windows.close('id') function.
>>
>> Scot
>>
>> P.S.  The screen shots don't show it, but the windows <script
>> src="..."> are in metricsHeader.php  ( Last photo )
>>
>> Quoting Felix Shnir <[EMAIL PROTECTED]>:
>>
>>> well it depends the structure, but it you are trying to kill window 1
>> from
>>> inside of window 2 (if using iframes), you'd need to do
>>> top.top.Windows.close('id') to reach the opening parent of the window
>> 1...
>>>
>>> If you have a sample somewhere, show us, that'll be a bit clearer.
>>>
>>> Felix.
>>>
>>>
>>> On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>>>
>>>> Hello All,
>>>>
>>>> I know that this has been asked and answered, but I can't get it to
>>>> work.  I have one Window that opens another window... I want the user
>>>> to be able to close the second window with a link on the page, but
>>>> 'top.Windows.close('your_window_id')' doesn't do anything as the
>>>> target of an anchor... Any suggestions on how this is supposed to work
>>>> will be appreciated.
>>>>
>>>> Scot L. Diddle, Principle, IS, UPS Freight, Richmond VA
>>>>
>>>> +-Window 1--------+
>>>> |                 |
>>>> | +-Window 2-+    |
>>>> | |          |    |
>>>> | | Close    |    |
>>>> | | Button   |    |
>>>> | |          |    |
>>>> | +----------+    |
>>>> |                 |
>>>> |                 |
>>>> |                 |
>>>> +-----------------+
>>>>
>>>>
>>>> _______________________________________________
>>>> Javawin mailing list
>>>> [email protected]
>>>> http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
>>>>
>>
>>
>>
>> _______________________________________________
>> Javawin mailing list
>> [email protected]
>> http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com
>>



_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com

Reply via email to