Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locking the page while loading
Message
De
08/04/2002 07:14:36
 
 
À
01/04/2002 02:06:25
Information générale
Forum:
Internet
Catégorie:
Javascript
Divers
Thread ID:
00639340
Message ID:
00642095
Vues:
32
>Is there a way in javascript to lock the page while it's loading? Sometimes, based on the content, when the user starts to click on an item, while the page is loading, this will stop the process and will generate errors. That is normal as the full content has not been submitted. Is there a way to avoid that?

A bit late, but if you're still looking for an answer.

For both IE & Netscape, initialise a variable ClickOK to false in the HTML header & setting to true in the onLoad event of the body of the document.

For IE you could then use (all clickable items need modifying, though this could be avoided with CSS & behavior's to attach events)
<a href="xxxx.html" onClick="window.event.returnValue=ClickOK">.....</a>
For Netscape you could then use the following, also in the HTML header :
function myClickHandler()
{
return ClickOK
}

window.captureEvents( Event.CLICK )
window.onClick = myClickHandler
Len Speed
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform