Guys, I am new to jQuery. And I am trying to use jQuery for my application. I am stuck at something which I want to use. Here is the detail
I have a page, which when submitted, gets a full HTML as response (complete html, head, body). So I tried to replace the body of present page with the body of response page. Somehow jQuery does not work with that. So I though why not create a div tag just under body and replace that. When I do that, the body turns empty. I alerted newBody and it shows as empty string, I then tried with table at the first child of body, same thing. Is is a funcationalty or bug in jQuery. Am I missing something, please help. I have wasted all my day today on this. Here is the function and div tag values function processXml(responseXML) { var newBody = $('#Testing', responseXML); $("#Testing").replaceWith(newBody); } Here is the body part of the XHTML <body bgcolor="#F4FFE4"> <div id="Testing"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> //blah blah blah </table> </div> </body> Please help!! Mahen