I don’t know, if I understand correctly, what you’re asking about, because your question is asked a little bit strange. But I have the feeling, that you’re mixing two separate things.
renderPartial is used to render part of a bigger view and generally has nothing to do with AJAX. You may use it (though anything that is returned as AJAX reply should be as simple, as possible, so using renderPartial here is not that wise idea) or you may not use it at all.
(this is at least three years old knowledge, so feel free to correct me, if I said some stupid things)
Maybe my question wasn’t clear, so let me explain it…
At first, the facts:
Browsers don’t parse scripts tags inserted into the DOM, but jquery does. The second fact is that you can register scripts at any time.
So lets say you are developing an app which uses ajax to load pages. In this case the simpliest solution is send back the view rendered by renderPartial,and insert the response into the DOM with jquery on client side. If you rendered the view with processoutput=true, your registered scripts will be added to the output. But as you see from the code above, if the output is not a full page, your registered scripts at pos_ready won’t be wrapped in by the document.ready function.
So my question is that why will my scripts be rendered into the document ready function ONLY if the output is a full page?