iamnoah / writeCapture

Utility to assist the Ajax loading of HTML containing script tags that use document.write. Mailing List: http://groups.google.com/group/writecapturejs-users
http://iamnoah.github.com/writeCapture
Other
241 stars 38 forks source link

Ajax callbacks not firing properly #46

Closed aariacarterweir closed 12 years ago

aariacarterweir commented 12 years ago

When loading ads in, I'm often left with the following trailing text node: window['document_write_ajax_callbacks']['50']();

Any idea of where I could start even looking to hack in a fix?

iamnoah commented 12 years ago

That usually means the script that was run had an error, so writeCapture wasn't able to cleanup. You can try enabling the various options writeCapture accepts: https://github.com/iamnoah/writeCapture/wiki/Options

There is also an experimental rewritten version of write capture available here that could be more compatible with your ads: https://github.com/iamnoah/writeCapture/blob/writeCapture2/writeCapture2.js

aariacarterweir commented 12 years ago

Thanks iamnoah - writecapture has been a fantastic product for us. Does the new version have any dependencies? I couldn't get it to work at all. Looks like it might need require.js ?

iamnoah commented 12 years ago

Ah sorry, an AMD loader.js is not required (but they are supported). https://github.com/iamnoah/element.write is required though.

aariacarterweir commented 12 years ago

Thanks :)

aariacarterweir commented 12 years ago

Sorry iamnoah, no luck with this. Any way for me to just kill the text?

iamnoah commented 12 years ago

If you're using writeCapture2, there should be no text...

aariacarterweir commented 12 years ago

There's the problem then - I couldn't get writeCapture2 to work at all for me - but will give it a spin. Regardless of the text issues - I'm really grateful for the work you've put into this solution. It's a life-saver.

ehoch commented 12 years ago

Any luck on fixing this issue or getting writeCapture2 to work?