def ajax_dlink_refresh(idname, url, on_load_fn, timeout):
    global running_timeout, timeout_idname, timeout_url, timeout_on_load_fn, redo_timeout, timeout_id
    timeout_idname = idname
    timeout_url = url
    timeout_on_load_fn = on_load_fn
    redo_timeout = timeout
    if running_timeout > 0:
        return
    # FIXME: should use pyjamas.Timer.Timer
    from __javascript__ import setTimeout
    timeout_id = setTimeout(do_ajax_dlink_refresh, timeout)
    running_timeout = 1
dataset/ETHPy150Open anandology/pyjamas/library/dynamic.py/ajax_dlink_refresh/original