javascript interrupts loading of the page

B

boriq

Hallo all,

I have a website with a lot of picture. Each IMG tag has a parameter
onload="myScript();" to count how much pictures are already loaded.
Then I have another javascript that shows and hides the sub-menues of
main menu.
Problem is that when I click on the main menu to show its the sub-
menu, while the website is loading and the myScript() is counting
already loaded pictures, then myScript() (and the loading of the site)
is stopped by the script that shows/hides the sub-menu of main menu.

Is there a way of how to prevent this? I mean how not to stop the
loading of the website by activating javascript while the page is
still loading?

Thanks in advance.
Regards,
Boris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,169
Latest member
ArturoOlne
Top