0

I want to call a function and then reload the current page(sequentially) in webkit safari with javascript how can i do this: I tried :

(function(){ functionCall();window.location.href = window.location.href})();

but didn't work it only reloads the current page ; thanks.

  • By sequentially, you mean repeatedly in a loop? – Michael Berkowski May 09 '12 at 10:55
  • 1
    is `functionCall()` doing some asynchronous operation? – Fabrizio Calderan May 09 '12 at 10:55
  • 1
    See http://stackoverflow.com/questions/3992353/javascript-function-to-reload-a-page-every-x-seconds or http://stackoverflow.com/questions/4644027/auto-reload-web-page – Michael Berkowski May 09 '12 at 10:56
  • Michael : as a first step i'm trying to apply that without a loop ; when i get done with this i'll put it in a loop –  May 09 '12 at 10:58
  • Calderan no it is not doing so –  May 09 '12 at 11:00
  • @user1319236 If this isn't helpful, then you need to better describe what you are trying to do. – Michael Berkowski May 09 '12 at 11:37
  • i want to call a function from a webpage first of all called functionCall() and this function gives me another html page so i won't be able to call the same function because i'm redirected to another webpage with functionCall() , so i want to get back to the initial webpage and this by performing an reload of the page –  May 09 '12 at 13:02

0 Answers0