Currently i’m loading a remote URL inside a bootstrap modal dialog, i’ve recently attempted to load a captcha (the remote URL is a login/register form) into the modal, but it seems the script gets stripped out. is there any way of avoiding/counteracting this?
Currently i’m loading a remote URL inside a bootstrap modal dialog, i’ve recently attempted
Share
Bootstrap uses jQuery.load to inject remotely delivered HTML into the modal. That method removes
<script>tags before injecting, to prevent errors in IE. Here’s a link to the annotated source where it does that.In general, it’s a bad idea to expect HTML received from AJAX as a string to execute its
<script>tags. If you have control over the remote server, you might want to refactor your approach and load the CAPTCHA script into your document separately.