views:

743

answers:

1

I have a jQuery statement which worked fine on IE7 and works on FF, but is failing on IE8.

The line is:

ScratchIFrame().find("fullwordmatch").wrap("<nonmarkupmatch></nonmarkupmatch>");

I added the following before it:

alert(ScratchIFrame().find("fullwordmatch").length);
alert(ScratchIFrame().html());

and get the results:

1
<fullwordmatch>test</fullwordmatch>

the error occurring is:

Message: Unexpected call to method or property access.
Line: 12
Char: 2305
Code: 0
URI: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js

Does anyone know what the problem might be?

Thanks, Dan

A: 

It could be related to the doctype you're using or the fact you're using custom html elements. Try changing the element to;

<div id="fullwordmatch">test</div>

and searching for it using;

ScratchIFrame().find("div#fullwordmatch");

Does the error still occur?

MatW
Thanks, seems to have moved on but still having problems.The wrap started working, but we then get other problems (like destroying markers afterwards - previously destroyed all </fullwordmatch> but obviously can't do that with </div>).It looks like the IE8 scripting engine messes about with the DOM in ways in which it wasn't asked to. I'm going to investigate more.