473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

BODY onLoad not fires!

Hello!

I noticed a very strange behavior an I cannot work it around. Id
appreciate any help on this, as it's driving me nuts...

I have a WinXP SP1 computer with MSIE 6. It has Flash plugin version 7
installed. I have a frameset, and one of the documents in frames has
<BODY onLoad="..."> handler and an Flash object. To diagnose the
problem, I put <BODY onLoad="alert('a');"> statement. And... the code is
not run! But only when:

* There is a Flash object on the page. If I remove the Flash movie, the
code fires.
* The document is opened for the first time in this window - if I click
the link to this document once - it loads, but the code is not fired. I
click it again, it loads again, and then the code is fired!
* The document is in a rame. If opened alone, the code always works.
* The document is opened in MSIE 6. In Netscape 7.2, it works OK. My
friend who also has MSIE sees the same problem, so it's not the problem
of my particular computer.

The whole thing makes me feel like maybe this particular Flash movie
somehow disables onLoad event, or maybe my JavaScript code in other
frames disables it? But how is this possible? What can be the cause of it?

Thanks in advance,
Michau.

Jul 23 '05 #1
2 1622
VK
Is it your flash movie? Can you look inside of it?

body.onLoad fires up when all page elements reported their state to be OK,
Error, or Abort, which means that whatever could be loaded is loaded, and
whatever couldn't - screw it.
If the movie inits extra server downloads (scenes, url verification, etc.)
then onLoad may be compromised.
And yes, ActiveScript inside the flash movie can affect too.
Jul 23 '05 #2
Unfortunately, it's not my Flash movie :( But yes, it has ActiveScript
in it and in fact it tries to call some JavaScript function by opening
an URL of "javascript:functionName()" form. Maybe that's the cause?

Regards,
Michau.

VK wrote:
Is it your flash movie? Can you look inside of it?

body.onLoad fires up when all page elements reported their state to be OK,
Error, or Abort, which means that whatever could be loaded is loaded, and
whatever couldn't - screw it.
If the movie inits extra server downloads (scenes, url verification, etc.)
then onLoad may be compromised.
And yes, ActiveScript inside the flash movie can affect too.


Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Robert Oschler | last post by:
I have an frame in one of my documents (not a frameset document). The top level document has an "onload" handler in the BODY tag. I have found that if the frame is unable to navigate to the...
5
by: Emmanuel Papillon | last post by:
Hello. I've got a page with sound through a swf file, working with an animation with preloaded JPEG files (animated through use of setTimeout). I'm preloading the JPEG files through Javascript...
2
by: Brian | last post by:
Hi all. I have a bunch of pages that reference an external script from the head section. I'd like to add additional <script> elements to the pages' bodies, but I can't edit the pages...
2
by: sonic | last post by:
Hi, I have some code attached to window.onload event and if there is a missing flash file on the page for example, the browser (MSIE in my case) displays "1 item(s) remaining" message, and since...
2
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would...
5
by: Patient Guy | last post by:
I have this in a document: <body onload="a_function(this);"> In an (external) script file, I define a_function() as follows: function a_function(obj) { // surprise errant coding here
4
by: Jason | last post by:
Hi, Here's the scenario: I have a web application that has window A and window B. A user has both window A and B open - window A is in the foreground and window B is behind it. If the...
5
by: mazdotnet | last post by:
Hi, I have a master file with the following setting <body runat="server" id="Body"> and in the .cs I have Body.Attributes.Add("onload", "menuCurrentPage('current','navlist');"); Now in one...
2
by: WGW | last post by:
Hello all, I need another set of eyes cause it just isn't working, no matter how identical I make it. The initRotator function works when called by itself, but when adding another function, only the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.