Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have the code below

JavaScript
GetListTourneeByPersonnelIDFromServer();
window.location = './Calendrier.html';


When I execute this code there is, the redirection to the Calendar page cancels the execution of the GetListTourneeByPersonnelIDFromServer function, and since I can not use the term CallBack, because in GetListTourneeByPersonnelIDFromServer function called it there's more to another function that contains loops, how to resolved this problem and thanx
Posted
Comments
ibrahimCA 9-Sep-13 9:09am    
I'm blocked, can you help me please

1 solution

Hi,
JavaScript
add the window.location.href="page.html" at end of the function GetListTourneeByPersonnelIDFromServer()


As javascript function calls are asynchronous so it immediately going to next line of code. And before completing function execution it is redirecting to next page.
May this will solve the issue.

--Avinash
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900