I am trying to grab a value from a url:
http://localhost:8080/bin/task_status?id=2&cmd=percent_done
I am unsure how to actually do this within a javascript (ajax) command that once the page has been loaded will be called every .5 seconds. It is using the AJAX built in progress bar to display.
I am trying to grab a value from a url: http://localhost:8080/bin/task_status?id=2&cmd=percent_done I am unsure
Share
In jQuery you can do:
setInterval()is a built-in JavaScript function that repeats a command every X milliseconds, and$.get()performs an AJAX request.As @Pointy mentioned in a comment, this will work only if the page is also hosted on localhost:8080