IE and Chrome not executing unexpected javascript that comes up during runtime
I am using GWT and google maps. I created a custom infowindow which contains a script that will send an http request to twitter for the most recent tweets. i want to display this content inside a tab of the infowindow, but it is only working as expected开发者_StackOverflow in firefox. I suspect that this may be the case because IE and Chrome need to know about the content of the div earlier than firefox. heres the code that isnt being executed in ie or chrome:
HTML recentTweets = new HTML(
"<body>"+
"<div style='color: #ffffff; background-color: #010101'>"+
"<script type='text/javascript' src='http://twitter.com/javascripts/blogger.js'></script>"+
"<script type='text/javascript' src='http://twitter.com/statuses/user_timeline/stephenathome.json?callback=twitterCallback2&count=3'></script>"+
"</div>"+
"</body>");
in ie, i will get an infowindow with
<script type='text/javascript' src='http://twitter.com/statuses/user_timeline/stephenathome.json?callback=twitterCallback2&count=3'>
note that the end script tag isnt included. in chrome, the infowindow is blank. in firefox, the tweets display as expected.
is anyone familiar with a workaround?
Put your script tags into the project's *.gwt.xml file. GWT will than handle the rest.
Something like this
<module>
<inherits ... />
<script src='http://twitter.com/statuses/user_timeline/stephenathome.json?callback=twitterCallback2&count=3'>
</module>
精彩评论