Subj : Re: Javascript infinite loop To : netscape.public.mozilla.java,netscape.public.mozilla.jseng From : =?ISO-8859-1?Q?Georg_Maa=DF?= Date : Sat May 10 2003 08:35 am Andrea wrote: > function SaveData() { > .... > .... > .... > > while () { > window.status='Saving data ...'; > } > window.status='Data saved!'; > .... > .... > .... > } > > But it don't work because while the loop run nothing else can run (including > the interval in the second frame!) so this loop became infinite!!! > Exist a Javascript istruction to put in the loop that enable the execution > of the other process? (something like the DoEvents istruction in VB) Events are not part of the language but part of the environement, where the language is used. DoEvents is a library function not a feature of VB it self. An event similiar mechanism inside the language are exceptions. Your algorithm allways will loop endless, because the machin is completely busy with doing nothing and checking whether doing nothing has finished. -- Georg Maaß - bioshop.de D-93466 Chamerau, Roßbergweg 42 JavaScript, C++ Engineering - The ultimative DHTML engine: http://gml-modul.sourceforge.net - http://sourceforge.net/projects/gml-modul .