Domready behavior with XMLHttpRequest

I found a date picker javascript code ( It places a button next to a text field and it allows you to select a date from a calendar. It works perfect, but I cannot get it work on the content that comes from XMLHttpRequest.
Basically, I have a popup CSS windows and it contains a form that is returned by XMLHttpRequest, on that form I am trying to place a date picker, but it not working.
My guess, it will not work since the date picker I found uses domready and content that comes from XMLHttpRequest is not part of the original document.
I hope that make sense, please let me know if it is not clear or confusing.
My question, is there a way to get this to work?

Execuation of date picker

<script type="text/javascript">
    window.addEvent('domready', function() { 
           myCal = new Calendar({ date: 'd/m/Y' }); });

Any suggestions are appreciated.