[Javascript] Onload and onunload spinner

Terry Riegel riegel at clearimageonline.com
Fri Jan 5 08:21:40 CST 2007


After posting this last night I woke up and thought I am working in  
the wrong area. Instead of working on the individual frames to  
trigger the events I need to work on the actual Frame page. So I  
tried it this morning and was able to get it to work with the onload  
event. Here is what I did.

   <frameset rows="42,20,*" border="0" frameborder="0" border="0"  
framespacing="0">
    <frame src="toolbar.html" name="tpbr" scrolling="no"  
marginwidth="0" marginheight="0">
    <frame src="path.html" name="path" scrolling="no" marginwidth="0"  
marginheight="0">
    <frameset cols="30%,70%"  frameborder="3" border="3"  
framespacing="4">
     <frame src="browse.html" name="browse" scrolling="yes"  
marginwidth="0" marginheight="0">
     <frame src="details.html" name="details" marginwidth="0"  
marginheight="0" scrolling="yes" onload="if(top.frames 
['browse'].detailsinit){top.frames['browse'].detailsinit();}">
    </frameset>
   </frameset>

The browse frame loads the javascript file, Since I have control over  
the activities that trigger the unload I can make the rest of my code  
without using the onunload trigger. Since the onload triggers every  
time regardless of what is in the frame I now have a working spinner  
that activates when a page is being requested, and deactivates when  
the page is loaded.




On Jan 4, 2007, at 11:07 PM, 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