ボタンクリックイベントで呼び出される関数appendScriptを作成しました私の関数コードは
function appendScript()
{
var v_js;
var head= document.getElementsByTagName('head')[0];
v_js = document.createElement('script');
v_js.type = 'text/javascript';
v_js.src = "//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js";
head.appendChild(v_js);
var body = document.getElementsByTagName('body')[0];
v_js =document.createElement('script');
v_js.type="text/javascript" ;
v_js.src = "//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js";
body.appendChild(v_js);
var v_css = document.createElement('link');
body.appendChild(v_css);
interval=self.setInterval(function(){ if(jQuery && typeof $().modal == 'function')
{
window.clearInterval(interval);
//create a div in the body which we will use for our dialog.
$(document.getElementsByTagName('body')[0]).append('<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h3 id="myModalLabel">Modal header</h3></div><div class="modal-body"><p>One fine body…</p></div><div class="modal-footer"><button class="btn" data-dismiss="modal" aria-hidden="true">Close</button><button class="btn btn-primary">Save changes</button></div></div>');
$('#myModal').modal('show')
//setTimeout is non blocking (basically async) so lets put our apex call in a timeout so it doesn't
//stop our dialog from showing.
}
}
,300);
}
そして私が直面しているエラーは
Uncaught TypeError: undefined is not a function bootstrap.min.js:6
(anonymous function) bootstrap.min.js:6
(anonymous function) bootstrap.min.js:6