Try $('#xEditingArea').contents().find('body').html()
On Mon, Feb 16, 2009 at 3:31 PM, webdeveloperintexas <prove.faith...@gmail.com> wrote: > > I'm attempting to get the contents of the page -- its HTML code. > Everything always returns null. > Here is what I tried: > var details = $('#xEditingArea').html(); > alert("a"+details); -- returns null > var details = $('#xEditingArea iframe html body').html(); > alert("b"+details); -- returns null > > The page is using fckeditor and I need the contents of the fckeditor > which uses numerous iframes. > > The tags are these: > xEditingArea is the id of the td tag that then contains an iframe. > The iframe contains html then body tags. None of these have any > identifying characteristics put on them by the fckeditor so I can't > retrieve them using an id. > > Is there something in jquery that prevents it from returning the html? > Is it the iframes that is causing the problem? > I've tried hundreds of combinations and can't figure it out. > > I am doing an autosave and it used to work with niceditor but then I > had to switch over to fckeditor and found this problem. I've spent 3 > hours and have gotten nowhere. > > Any help would be appreciated. > > >