Skip to main content

Bug Tracker

Side navigation

#3071 closed bug (invalid)

Opened June 22, 2008 03:32AM UTC

Closed June 24, 2008 07:03PM UTC

Last modified March 14, 2012 08:57PM UTC

NO_MODIFICATION_ALLOWED_ERR with XHTML mime type

Reported by: parrots Owned by:
Priority: major Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: simplemodal Cc:
Blocked by: Blocking:
Description

In safari 3.1 on Mac I get the following error:

Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7

This occurs when using SimpleModal 1.1.1 (googling the error shows it happening with multiple plugins, though). Example of code usage can be found at http://www.nationalscholastic.org/headcount/meet/41 (although currently I've reverted the mime type to text to prevent this error)

This only started to happen once I changed the mime type for my pages to application/xhtml+xml. It seems to be caused by "div.innerHTML=wrap[1]+elem+wrap[2];" on line 22 (of the minified code). My assumption is that it doesn't like using innerHTML.

Attachments (0)
Change History (4)

Changed June 22, 2008 04:07AM UTC by parrots comment:1

A bit more playing around and it seems the error is caused by Safari trying to validate the innerHTML content (which makes sense since the page is being sent as XML and that should be valid). SimpleModal was trying to set the innerHTML to "<div>" first, and then to the actual content in a second call. Setting it to "<div>" is what was failing since the closing tag was missing. Not sure where the fault lies here, JQuery or SimpleModal.

Changed June 22, 2008 02:25PM UTC by emartin24 comment:2

In the SimpleModal source, try changing instances of:

$('<div>')

with:

$('<div/>')

Changed June 24, 2008 07:03PM UTC by flesler comment:3

component: coreplugin
keywords: → simplemodal
resolution: → invalid
status: newclosed

It's logical that xml pages require correct html strings.

I'll close now, please let the owner of SimpleModal know about this so it can be fixed.

Changed August 25, 2011 09:14PM UTC by jlafrate@national.aaa.com comment:4

Replying to [ticket:3071 parrots]:

In safari 3.1 on Mac I get the following error: Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7 This occurs when using SimpleModal 1.1.1 (googling the error shows it happening with multiple plugins, though). Example of code usage can be found at http://www.nationalscholastic.org/headcount/meet/41 (although currently I've reverted the mime type to text to prevent this error) This only started to happen once I changed the mime type for my pages to application/xhtml+xml. It seems to be caused by "div.innerHTML=wrap[1]+elem+wrap[2];" on line 22 (of the minified code). My assumption is that it doesn't like using innerHTML.

I am getting a similar error:

The following contents saved as somepage.xhtml

will throw

jquery-1.6.2.js:6111 NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7: An attempt was made to modify an object where modifications are not allowed.

in safari.

which is line

div.innerHTML = wrap[1] + elem + wrap[2];

in the jquery-1.6.2.js

Thanks

Jeff

jlafrate@national.aaa.com

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:trav="http://www.aaa.com/jsf/facelets/travel" xmlns:spry="http://ns.adobe.com/spry">

<head>

<title>somepage

</title>

<meta name="DESCRIPTION" content="ebooks_metaDescription" /><meta content="All rights reserved." name="copyright" />

<script type="text/javascript" src="/jsincludes/jquery/jquery-1.6.2.js" language="javascript"></script>

<script type="text/javascript" src="/jsincludes/jquery/1.0b2/jquery.mobile-1.0b2.js" language="javascript"></script>

</head>

<body>

</body>

</html>