added the possibility to get a document via ajax request asynchrosously in a function

to be able to get ressources without having each time to write a full ajax request