私はレールに乗っており、これを表示すると、Googleのルート案内ウィジェットが読み込まれます。
<div>
<script src="//www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/114281111391296844949/driving-directions.xml&up_fromLocation=&up_myLocations=<%= @meeting.location.address %>&up_defaultDirectionsType=&up_autoExpand=&synd=open&w=320&h=55&title=Directions+by+Google+Maps&lang=en&country=US&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
</div>
しかし、ページに「方向」と呼ばれるリンクがあり、誰かが方向をクリックしたときに上記をカラーボックスにロードしたい場合、ウィジェットはロードされません。
$(".location-directions").click(function(){
$(this).colorbox({
open: true,
href: "/directions?mid=<%= @meeting.id %>",
width: "400px",
height: "300px",
overlayClose:true,
escKey:true,
returnFocus:true
});
return false;
})
開いたカラーボックスは空です。ウィジェットはありません。「/directions」ルートは、同じgoogleスクリプトパスを持つビューを再び開きます。
<div>
<script src="//www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/114281111391296844949/driving-directions.xml&up_fromLocation=&up_myLocations=<%= @meeting.location.address %>&up_defaultDirectionsType=&up_autoExpand=&synd=open&w=320&h=55&title=Directions+by+Google+Maps&lang=en&country=US&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
</div>
手がかりはありますか?