Hi,
I'm reluctantly posting this question in this forum as I'm not sure whether it's a SmartGWT issue or a browser issue (or something else). Moreover, I'm new to GWT and SmartGWT. So, please don't shoot me if it doesn't belong here.
Problem:
I've added the official Tweet Button to my SmartGWT based app using an HTMLPane widget. The button shows up fine in FF 3.6, but it doesn't work in IE 7 and Chrome 7. IE and Chrome only show the hyperlink "Tweet".
This is the code I got from http://twitter.com/about/resources/tweetbutton :
Obviously, the code works fine when put in a normal HTML page, and (as I mentioned above) it works fine in my SmartGWT app on Firefox.
My application code looks similar to the following:
I suspect that the embedded javascript (http://platform.twitter.com/widgets.js) is not getting executed. I tried adding the setEvalScriptBlocks(true) call, but it didn't change anything.
Can I use a different widget to get around the issue? Is there any other way to fix this issue?
I'll appreciate all help.
Thanks.
I'm reluctantly posting this question in this forum as I'm not sure whether it's a SmartGWT issue or a browser issue (or something else). Moreover, I'm new to GWT and SmartGWT. So, please don't shoot me if it doesn't belong here.
Problem:
I've added the official Tweet Button to my SmartGWT based app using an HTMLPane widget. The button shows up fine in FF 3.6, but it doesn't work in IE 7 and Chrome 7. IE and Chrome only show the hyperlink "Tweet".
This is the code I got from http://twitter.com/about/resources/tweetbutton :
Code:
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="mytwitterid">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
My application code looks similar to the following:
Code:
String contents = "<a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-count=\"horizontal\" data-via=\"mytwitterid\">Tweet</a><script type=\"text/javascript\" src=\"http://platform.twitter.com/widgets.js\"></script>"; HTMLPane htmlPane = new HTMLPane(); htmlPane.setContents(contents); //htmlPane.setEvalScriptBlocks(true);
I suspect that the embedded javascript (http://platform.twitter.com/widgets.js) is not getting executed. I tried adding the setEvalScriptBlocks(true) call, but it didn't change anything.
Can I use a different widget to get around the issue? Is there any other way to fix this issue?
I'll appreciate all help.
Thanks.
Comment