My guess would that is has something to do with the text() function. I am a Prototype guy myself but I ran into a similar problem with IE a little while ago. It came from me trying to pull the textContent value from an element in the DOM. I could grab the value in all other browser but IE was giving me the shaft. After running some tests, this is what I came up with:
IE does not support element.textContent. In most browsers, like FireFox, you would be able to pull the textContent value from element.
Example
<p id="my_element">this is my element</p>
alert($('my_element').textContent); // will alert "this is my element"
In IE, you need to use element.innerHTML. This will return the value you want. Right now, I assume that text() is returning the textContent value and that is why you're getting no dice.
Example
<p id="my_element">this is my element</p>
alert($('my_element').innerHTML); // will alert "this is my element"
Hope this helps!