Jquery html() doesn't work for me, but innerHTML() do?



Hello all:

I've a form working with the form plugin. It works fine. I have the next
callback method:

function showResponse(responseText, statusText){
        alert(responseText);
        $('#frameBody').html(responseText);
        alert ($('#frameBody').html());
 
}

When the showResponse() method is invoked, the first alert() shows something
like that:

<div>
 
    <spann>buttons</spann>
    <div id="myDiv">
        <div id="errorsDiv">
             <html:errors />
        </div>
        <spann>Main Page</spann>
    </div>
</div>

(I have intentionally changed the "span" tag to "spann", in order to show
this post correctly)

As you can imagine, this code is generated by a jsp page, in a struts
framework.
The surprise comes with the second alert():

<SPANN>Main Page</SPANN>

Where is the rest of the code? If I change :
$('#frameBody').html(responseText);

to
document.getElementById("frameBody").innerHTML = responseText;

it works fine!!!!. What is happening? Must I use the old fashioned way ?

This is only a jquery proof of concept, but it is worrying me... Any idea?



I've solved my problem. The jsp that generates the html was not including the
struts html taglib, and the element "" wash crashing the
jquery.