Jump to content


Photo

Chapter 8 I Don't Understand


  • Please log in to reply
1 reply to this topic

#1 aerosky

aerosky

    New Member

  • Members
  • Pip
  • 7 posts

Posted 06 February 2013 - 12:34 AM

Hello Adnan i ask one more time your help :)

In the chapter 8 i understant that we can not use a setInterval function because it could call a function each X seconds without waiting for the end of this one
But i don't understand how is working the solution page 312 (French version) with var FREQ = 10000;

Posted Image

Could you indicate me the order by numbers and if the function wait or not before doing the next action
Thank you by adavance

Aerosky

Edited by aerosky, 06 February 2013 - 01:11 AM.


#2 __Adnan

__Adnan

    New Member

  • Members
  • Pip
  • 5 posts

Posted 08 February 2013 - 05:45 AM

I could not understand what you are asking. Ask one question at a time.


function MyFunction2()
{   
    getXMLRacers();
    startAJAXcalls();
}
function startAJAXcalls()
{
    setTimeout(MyFunction2, FREQ); // you can modify the call to setTimeout to something like this
}


Perhaps the above code will reduce some confusion.

Edited by __Adnan, 08 February 2013 - 05:50 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users