Task with creating XmlHttpRequest objects in properly way