====
load
====

.. js:function:: load(callback)

**domain**: client 

**language**: javascript

**class** :doc:`Task </refs/client/task_api>`

Description
===========

``Load`` method loads the project :doc:`task tree </programming/task_tree>` from
the server and initilizes it.

When a Web browser loads the jam.js library in index.html file, jam.js creates an 
empty task object. The ``load`` method loads the project 
:doc:`task tree </programming/task_tree>` from the server and
initilizes it (see :doc:`workflow </programming/workflow>`). 
After that the application triggers 
:doc:`on_page_loaded <on_page_loaded>` event.

Example
=======

The following code is from the project index.html file. 

.. code-block:: html

    <script src="/jam/js/jam.js"></script>
    <script src="/js/events.js"></script>

    <script>
    $(document).ready(function(){
        task.load();
      });
    </script>

See also
========

:doc:`login <m_login>`

:doc:`logout <m_logout>`

:doc:`user_info <at_user_info>`

:doc:`Users </admin/users>`

:doc:`Roles </admin/roles>`
