开发者

Load javascript within a google map info window HTML content

I would like to load a javascript script within a google map info window HTML content but,开发者_Python百科 for reasons I don't understand, the script is not loaded.

I generate my infowindow like that :

var info_window = new google.maps.InfoWindow({"content":"<script type=\"text\/javascript\" src=\"\/path\/to\/js\"><\/script>"});

I precise that the javascript path has been tested.

Is it possible to load javascript script like that? If yes, what's wrong ?


Are you using jQuery?

If so, you could add the script anywhere else in the document besides the infowindow and use .ajaxComplete() to target some script to the infowindow after the ajax call has finished.

http://api.jquery.com/ajaxComplete/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜