[Javascript] Onload and onunload spinner

Tobias Parent toby at kidstimetogo.com
Fri Jan 5 08:18:20 CST 2007


Actually, this may not be as painful as I thought, although it IS 
kludgy. Back about nine years ago, I'd done something similar - a page 
with four frames, one of which was simply a status list. What happens 
is, the frame you want to do the 'listening' (the one to be affected by 
the onLoad and onUnLoad), simply listens to a variable set in the parent 
frame (the first common parent to both frames). The frame to be listened 
to sets the variable as needed, so onLoad sets it to 'Complete', while 
onUnload sets it to 'Updating...'. This is just a concept, no proof to 
back it. Thought this through in the shower, and it seems workable. Sort 
of a modification of the 'Observer' pattern, somewhat.

Regards!
 -Toby Parent
   http://www.tobytheballoonguy.com/

> Terry Riegel wrote:
>> Well, no use beating a dead horse. I am guessing this problem is not 
>> doable? I for one have spent way to much time on it.
>>
>> Thanks,
>>
>> Terry
>>
>>
>> On Jan 4, 2007, at 10:32 AM, Terry Riegel wrote:
>>
>>> It may not be possible, but I am looking for a way to trigger an 
>>> event everytime a web connection starts, then another event when it 
>>> finishes.
>>>
>>> I have a Frames based page like...
>>>
>>>   +---------------------------+
>>>   |buttons                *   |
>>>   +---------------------------+
>>>   |path                       |
>>>   +-------+-------------------+
>>>   |browse |details            |
>>>   |       |                   |
>>>   |       |                   |
>>>   |       |                   |
>>>   +-------+-------------------+
>>>
>>> I am trying to figure out how to have "buttons" monitor activity on 
>>> "details" when a page is requested turn on the spinner, when it is 
>>> loaded turn off the spinner. Onload and onunload do not seem to be 
>>> consistent for this. The content in details is from the same domain 
>>> as all of the other pages, but will not be managed by this, so 
>>> adding js to this page will not work.
>>>
>>> Any Ideas?
>>>
>>>
>>> Terry
>>>
>>>
>>>
>>> On Jan 3, 2007, at 2:32 PM, Terry Riegel wrote:
>>>
>>>> This is what I have that fires sometimes.
>>>>
>>>> top.frames['details'].window.onload=top.frames['browse'].a;
>>>> top.frames['details'].window.onunload=top.frames['browse'].b;
>>>>
>>>> My js library loads in the browse frame, and the a function turns 
>>>> the spinner off, the b turns it on.
>>>>
>>>> Terry
>>>>
>>>>
>>>> On Jan 3, 2007, at 2:08 PM, Terry Riegel wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I have an application that uses frames. I would like to set one 
>>>>> frame to monitor what is going on in the other and turn a spinner 
>>>>> on when it unloads, and turn it off when it loads. any quick 
>>>>> thoughts on how I should proceed.
>>>>>
>>>>> Terry
>>>>> _______________________________________________
>>>>> Javascript mailing list
>>>>> Javascript at LaTech.edu
>>>>> https://lists.LaTech.edu/mailman/listinfo/javascript
>>>>
>>>> _______________________________________________
>>>> Javascript mailing list
>>>> Javascript at LaTech.edu
>>>> https://lists.LaTech.edu/mailman/listinfo/javascript
>>>
>>> _______________________________________________
>>> Javascript mailing list
>>> Javascript at LaTech.edu
>>> https://lists.LaTech.edu/mailman/listinfo/javascript
>>
>> _______________________________________________
>> Javascript mailing list
>> Javascript at LaTech.edu
>> https://lists.LaTech.edu/mailman/listinfo/javascript
>




More information about the Javascript mailing list