devote / HTML5-History-API

HTML5 History API expansion for browsers not supporting pushState, replaceState
http://spb-piksel.ru
MIT License
1.02k stars 182 forks source link

Ajax update script error 80020101 with IE #20

Closed wsaca closed 11 years ago

wsaca commented 11 years ago

Hello, I'm new here, My problem is when I try to update this script from an ajax response, some like this:

$('head').html(newHeadContent);

I'm using jquery and I'm getting the error 80020101 related to this code in jquery:

globalEval: function( data ) { if ( data && core_rnotwhite.test( data ) ) { // We use execScript on Internet Explorer // We use an anonymous function so that context is window // rather than jQuery in Firefox ( window.execScript || function( data ) { window[ "eval" ].call( window, data ); } )( data ); } } the problem is with IE only. maybe some problem with the history.min.js code.

devote commented 11 years ago

Hi,

do not quite understand the problem. can describe the problem in detail?

wsaca commented 11 years ago

Of course, for example: I send an ajax request to update the whole page when an error is detected, the response include the new head and body code, in this case the error is when I update the head content, supposing:

newHeadContent = "script src="/app/resources/plugins/history.min.js" type="text/javascript" " (ignored brackets, I don't know how declare the text like code)

I update the head using the jquery's html function like this:

$('head').html(newHeadContent);

internally jquery call window.execScript to process the script, but is highly restrictive. check this link:

http://www.ascadnetworks.com/Guides-and-Tips/IE-error-%2522Could-not-complete-the-operation-due-to-error-80020101%2522

the problem is caused because of the javascript file, maybe some line is causing this error with IE, I don't have this problem for example with Modernizr.

devote commented 11 years ago

not actual