My guess would be that this is that sort of thing that will be browser depdendant. I suppose the question could be rephrased to:
Does browser X honour cookies passed by pages that were requested within the clients JavaScript.
My view is that the answer to this is probably yes to most browsers, but that is mainly a gut feeling. A better option however, could be to set the cookies in the JavaScript code based upon the response from PHP.
Hope this helps!