Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery .load() XHTML issue
    text
    copied!<p>I am having some strange problems loading content from another XHTML page via jQuery. When the second page I try to load from is served as XHTML I get the below error. I don't know if it helps but both documents validate when I get the error.</p> <blockquote> <p>Uncaught Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7</p> </blockquote> <p>Currently the header on the second page I load from is:</p> <pre><code>&lt;?xml version="1.0" encoding="iso-8859-1" ?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt; &lt;meta name="language" content="en" /&gt; &lt;title&gt;some title&lt;/title&gt; &lt;!-- CSS &amp; Javascript included here --&gt; &lt;/head&gt; </code></pre> <p>The content type is set as:</p> <blockquote> <p>application/xhtml+xml;charset=iso-8859-1</p> </blockquote> <p><strong>Interestingly, when I remove all the XHTML stuff from the header and stop setting the content type the error does not occur and everything works great</strong>.</p> <p>The load process currently looks like the below. It works fine when everything is plain HTML.</p> <pre><code>$('#overpage').find(".wrap").load(this.getTrigger().attr("href")+" #op").show(); </code></pre> <p>I'm curious why the process only does not work when the second page I load from is XHTML. I don't want to serve the page as just plain HTML and am looking for advice on what I am doing wrong. Both pages validate and I'm really scratching my head here. Many thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload