2012-07-16 2 views
0

전 레일에 있으며 내 시야에서 이걸 가지고있을 때 Google 길 찾기 위젯이로드됩니다.ajax + colorbox를 사용하는 Google 길 찾기 위젯이 작동하지 않습니다.

<div> 
    <script src="//www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/114281111391296844949/driving-directions.xml&amp;up_fromLocation=&amp;up_myLocations=<%= @meeting.location.address %>&amp;up_defaultDirectionsType=&amp;up_autoExpand=&amp;synd=open&amp;w=320&amp;h=55&amp;title=Directions+by+Google+Maps&amp;lang=en&amp;country=US&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script> 
</div> 

하지만 내 페이지의 링크가있는 경우, 사람이 방향을 클릭 할 때 colorbox에로드 위의 "방향"라고하고 싶은 말은, 위젯이로드되지 않습니다.

$(".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; 
}) 

열리는 색상 상자가 비어 있습니다. 위젯은 없습니다. '/ 경로'경로는 다시 동일한 Google 스크립트 경로가있는보기를 엽니 다.

<div> 
    <script src="//www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/114281111391296844949/driving-directions.xml&amp;up_fromLocation=&amp;up_myLocations=<%= @meeting.location.address %>&amp;up_defaultDirectionsType=&amp;up_autoExpand=&amp;synd=open&amp;w=320&amp;h=55&amp;title=Directions+by+Google+Maps&amp;lang=en&amp;country=US&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script> 
</div> 

실마리가 있습니까?

답변

0

나는 똑같은 문제가있어서 지난 5 시간 동안 다른 일을 시도한 후에 마침내 // http : // 앞에 "http :"를 써야한다는 것을 알아 냈습니다 ... 그래서 "http : //www.gmodules.com...etc"와 같아야합니다. 희망이 잠을 자도록 도와줍니다.

+0

안녕 blast250, 도와 주셔서 감사합니다. 실제로 http로 추가하려고했지만 여전히 행운을 빕니다. 나는 지금 다른 일을하고 있지만 나중에 다시 방문해야 할 것입니다. – absolutskyy