O'Reilly Forums: Chapter 8 I Don't Understand - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chapter 8 I Don't Understand startAjaxCalls and getXMLRacers

#1 User is offline   aerosky 

  • New Member
  • Pip
  • Group: Members
  • Posts: 7
  • Joined: 15-January 13

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

This post has been edited by aerosky: 06 February 2013 - 01:11 AM

0

#2 User is offline   __Adnan 

  • New Member
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 16-September 12

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.

This post has been edited by __Adnan: 08 February 2013 - 05:50 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users