add polling of javascript