I'm having some weird issues loading content from another XHTML page through jQuery. When the second page I'm trying to load is served as XHTML, I get the following error. I don't know if this helps, but both documents check when I get an error.
Unprepared error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7
Currently, the title on the second page I'm loading is:
<?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="language" content="en" /> <title>some title</title> </head>
The content type is specified as:
application / XHTML + XML; encoding = iso-8859-1
Interestingly, when I remove all XHTML content from the header and stop setting the content type, an error does not occur and everything works fine .
Now the download process is as follows. It works great when everything is plain HTML.
$('#overpage').find(".wrap").load(this.getTrigger().attr("href")+" #op").show();
I am curious why this process does not work when the second page I load is XHTML. I donβt want to display the page as plain HTML, and Iβm looking for tips on what I'm doing wrong. Both pages are checked and I really scratch my head. Many thanks!
source share